You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(acp): edit/write permission requests don't include diff content block #31781
Reopening #11653, which was closed due to inactivity without a fix.
Description
When OpenCode runs in ACP mode (opencode acp), the session/request_permission call for edit tool operations does not include a content: [{ type: "diff" }] block in the toolCall payload.
The ACP SDK's RequestPermissionRequest accepts toolCall.content?: Array<ToolCallContent>, where a { type: "diff", path, oldText, newText } entry signals to the client that a diff view should be shown before the user approves. Without it, ACP clients that check for this block fall back to a plain approval prompt with no diff.
Observed behavior
When using OpenCode via ACP in CodeCompanion, the permission prompt is shown but no diff view is presented. Other ACP agents (e.g. claude-agent-acp) correctly include the diff content block and trigger the diff UI in the client.
Expected behavior
The permission request for edit operations should include the diff content block, allowing ACP clients to present a diff view alongside the approval prompt.
tbh, I feel the permissions request from OpenCode in CodeCompanion, in general, way poorer than Claude Code's one. I don't know if could be a similar issue, and couldn't go deeper to investigate. But it's worth a look.
@jlongster when you have some time, can you take a look on this, please? Feels like working blind use OpenCode ACP with CodeCompanion right now 😬 thank you so much 🙇
@adamdotdevin@thdxr Hey guys, good day, hope you guys are doing great. First of all, I'd like to start saying that I'm tagging you because you are shown as the most active contributors, and by no means I want to bypass @jlongster, on the other hand, I'm tagging someone else because I'm sure he is busy with more important things.
Let me also add an apology in advance if I'm being pushy on this. I'm "pinging" this issue because right now is kind of "weird", to not say "dangerous", to use OpenCode ACP within CodeCompanion or Zed, because how it is working today, in Codecompanion I never see the diff block, and in Zed I just see the edit was done after I approve the edit itself (and the edit itself is done, this means that I only see the diff after the edit is done).
I'm still using OpenCode because: it is opensource, all my agents are there, and I'm double-checking all the edits after they are done. But still feels like I'm "working blindly". The PR for the fix is already in-place and from all my tests, everything seems to be working nice.
I'll finish this saying thank you for this amazing tool, OpenCode is truly amazing and it was the tool that took my hand and guided me through the knowledge on how to use AI to improve my job. An inifinite amount of thanks wouldn't be enough.
Have a nice weekend you all, and remember: 🇧🇷 will win the World Cup!!!! 😄
Activity
ReeSilva commentedon Jun 10, 2026
tbh, I feel the permissions request from OpenCode in CodeCompanion, in general, way poorer than Claude Code's one. I don't know if could be a similar issue, and couldn't go deeper to investigate. But it's worth a look.
ReeSilva commentedon Jun 14, 2026
@jlongster when you have some time, can you take a look on this, please? Feels like working blind use OpenCode ACP with CodeCompanion right now 😬 thank you so much 🙇
ReeSilva commentedon Jun 25, 2026
@adamdotdevin @thdxr Hey guys, good day, hope you guys are doing great. First of all, I'd like to start saying that I'm tagging you because you are shown as the most active contributors, and by no means I want to bypass @jlongster, on the other hand, I'm tagging someone else because I'm sure he is busy with more important things.
Let me also add an apology in advance if I'm being pushy on this. I'm "pinging" this issue because right now is kind of "weird", to not say "dangerous", to use OpenCode ACP within CodeCompanion or Zed, because how it is working today, in
CodecompanionI never see the diff block, and in Zed I just see the edit was done after I approve the edit itself (and the edit itself is done, this means that I only see the diff after the edit is done).I'm still using OpenCode because: it is opensource, all my agents are there, and I'm double-checking all the edits after they are done. But still feels like I'm "working blindly". The PR for the fix is already in-place and from all my tests, everything seems to be working nice.
I'll finish this saying thank you for this amazing tool, OpenCode is truly amazing and it was the tool that took my hand and guided me through the knowledge on how to use AI to improve my job. An inifinite amount of thanks wouldn't be enough.
Have a nice weekend you all, and remember: 🇧🇷 will win the World Cup!!!! 😄