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
Plan mode doesn't restrict sub-agents spawned via task tool #26407
While I was working on a project, I noticed that the plan mode agent managed to spawn the another agent as a sub-task.This allowed the plan agent to bypass the read-only restriction.
I was in plan mode working on a session monitor plugin. I asked the model to create an implementation plan, and it did — but then it also spawned the the general tool as a subagent and passed the full set of instructions I was going to have the build agen implement. The sub-agent executed everything: created a plugin file, edited AGENTS.md, updated tracking files, and ran tests.
I realize that this bug has been reported before, but wanted to submit this in case it adds additional context for fixing the issue.
Asked the plan agent to write detailed instructions with this prompt: I agree, sounds like a solid plan. Create detailed instructions and add a step at the top for tracking. Then, we'll pass it on to the build agent.
Asked a follow-up question. Prompt: Do the instructions including testing?
Answered the assessment and answered the agent's question: "Should I add these to the instructions?" with "Yes"
The agent wrote the instructions, then proceed to spawn the sub-agent. I allowed it to run, as it was a low-impact change.
Screenshot and/or share link
Operating System
Microsoft Windows Version 25H2 (0S Build 26200.8246), WSL2, Ubuntu 24.04.4 LTS
Activity
github-actions commentedon May 8, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue adds new context or differs in a meaningful way, feel free to clarify in a comment on one of the existing issues.
github-actions commentedon Jul 9, 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.