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
Subagent can call plan_exit to escape plan mode #27886
Subagents spawned via the task tool can call plan_exit to escape plan mode. The tools map passed to SessionPrompt.prompt() in task.ts does not include plan_exit: false, so the deny rules set via deriveSubagentSessionPermission() are silently overwritten when the prompt function rewrites session permissions from the tools map.
Steps to reproduce
Enter plan mode
Have the plan agent spawn a subagent via the task tool
The subagent can call plan_exit and switch to build mode
Expected behavior
Subagents should not be able to call plan_exit. The tools map in the task tool should deny plan_exit for all subagent sessions.
Activity
github-actions commentedon Jul 16, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.