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
Subagents Bypass Plan Mode READ-ONLY Restrictions #26514
Bug Report: Plan Mode Permission Bypass via Subagents
Description
In Plan Mode (READ-ONLY phase), the main agent's file editing permissions are correctly restricted, but subagents retain full file modification capabilities, creating a security bypass.
Steps to Reproduce
Enable Plan Mode in opencode
As the main agent, attempt to use edit or write tool → Blocked by rules
Use the task tool to spawn a subagent (type: general)
Instruct the subagent to use edit or write tool → Succeeds
Expected Behavior
Subagents should inherit the same READ-ONLY restrictions as the main agent when Plan Mode is active.
Actual Behavior
Main agent: edit/write blocked with error: "The user has specified a rule which prevents you from using this specific tool call"
Subagent: edit/write execute successfully, bypassing Plan Mode restrictions
Impact
This is a permission bypass vulnerability. Users enable Plan Mode to prevent unintended modifications during planning/review phase. The subagent loophole allows circumventing this safety mechanism.
Unfortunately this fix appears to have caused a serious regression in permission inheritance for delegated subagents in deny-by-default configurations. I filed the follow-up here: #26700.
Activity
github-actions commentedon May 9, 2026
This issue might be a duplicate of existing issues. Please check:
Please review these issues before continuing. If your issue is distinct, please clarify how it differs.
nabilfreeman commentedon May 10, 2026
Unfortunately this fix appears to have caused a serious regression in permission inheritance for delegated subagents in deny-by-default configurations. I filed the follow-up here: #26700.
cc @kitlangton @nexxeln
fix(opencode): workflow subagents inherit parent deny/external_direct…
merge: task 3n — workflow subagents inherit parent permissions, anoma…
fix(workflow): per-step tools/skills compose with (never override) in…
fix(agent): preserve subagent self-declared tool allows over inherite…
fix(opencode): workflow subagents inherit parent deny/external_direct…
merge: task 3n — workflow subagents inherit parent permissions, anoma…