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
OpenCode tasks bypass Claude Code project permission deny rules #33
OpenCode runs outside Claude Code's own tool permission system. A project-level .claude/settings.json deny rule that blocks Claude from reading or editing a file may not stop /opencode:rescue from asking OpenCode to inspect or modify that same file.
This is a security-model gap rather than a transport bug.
Local evidence
/opencode:rescue forwards user text to opencode-companion.mjs task, which sends a prompt to the OpenCode HTTP server. OpenCode then uses its own agent/tool permissions, not Claude Code's Read(...), Edit(...), or deny-list enforcement.
Read/write task defaults are also broad:
handleTask() defaults isWrite to true.
buildTaskPrompt() tells OpenCode: You have full read/write access. Make the necessary code changes.
Expected behavior
The plugin should either respect project-level Claude Code deny rules or document clearly that OpenCode has an independent permission boundary.
Suggested fix
At minimum:
Document the permission boundary in README and /opencode:setup output.
Warn when .claude/settings.json contains deny rules and the user starts a write-capable rescue task.
Potential stronger fix:
Parse applicable deny rules from .claude/settings.json.
Inject explicit forbidden paths into the task prompt.
For OpenCode tool configuration, disable or constrain tools when the requested task overlaps denied paths, if OpenCode exposes a suitable control surface.
Fixed in PR #56: the companion now reads .claude/settings.json deny rules on every write-capable task and emits a stderr warning listing the blocked paths, so users can make an informed choice. README updated to document the permission boundary.
Activity
fix: track plugin-spawned server PID and warn on deny rules
JohnnyVicious commentedon Apr 12, 2026
Fixed in PR #56: the companion now reads .claude/settings.json deny rules on every write-capable task and emits a stderr warning listing the blocked paths, so users can make an informed choice. README updated to document the permission boundary.
Fix PR #51 verification follow-ups (#56)