opencode
opencode copied to clipboard
[ACP] Opencode sets rawInput back to empty
Description
Here is an example tool call when using opencode acp (removed irrelevant fields):
[
{
"update": {
"kind": "execute",
"rawInput": {},
"sessionUpdate": "tool_call",
"status": "pending",
"title": "bash",
"toolCallId": "id1"
}
},
{
"update": {
"rawInput": {
"command": "echo 'foo'",
"description": "Print 'foo'"
},
"sessionUpdate": "tool_call_update",
"status": "in_progress",
"toolCallId": "id1"
}
},
{
"toolCall": {
"kind": "execute",
"rawInput": {},
"status": "pending",
"title": "bash",
"toolCallId": "id1"
}
},
{
"update": {
"rawInput": {
"command": "echo 'foo'",
"description": "Print 'foo'"
},
"sessionUpdate": "tool_call_update",
"status": "in_progress",
"toolCallId": "id1"
}
}
]
As you can see, we:
- Get the initial SessionUpdate for the tool call
- Get an update with command and description
- Get a permission request that sets
rawInputback to{} - Get an update for the status that sets
rawInputback to the state from before the permission request.
This is unfortunate, because that means when we display the details of the tool call to the user, they have nothing to base their decision on except the title and kind, which didn't get overwritten.
Plugins
None
OpenCode version
1.1.4
Steps to reproduce
- Set up an ACP session
- Get the agent to request a permission
Screenshot and/or share link
No response
Operating System
Alpine Linux
Terminal
st