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
Sub-agent in plan mode bypasses restrictions after compaction #18213
The Plan agent spawned a sub-agent to explore the project. A compaction happened during the exploration. Then, the sub-agent used cat and sed commands to modify the code. After the sub-agent had finished its work, the Plan agent told me, "You have completed all the tasks."
Plugins
No plugin installed
OpenCode version
1.2.27
Steps to reproduce
I asked in Plan mode, "What is the best way to do it?"
The agent in Plan mode spawned a sub-agent to explore the big picture of the project.
The sub-agent only read the code.
Compaction happened.
The sub-agent used cat and sed commands to modify the code instead of just exploring.
The agent in Plan mode told me, "All tasks had been completed before you asked."
Activity
8x34tnxge commentedon Apr 15, 2026
I don't know if it's fixed in the latest version 'cause I have disabled compaction. But the problem seems to be
it looks like the General sub-agent is the default option for spawning a sub-agent?
neuhaus commentedon May 1, 2026
This critical issue is a duplicate of issue #7292 and hasn't been fixed since it was introduced on Jan 1st.
neuhaus commentedon Jun 28, 2026
Why isn‘t the default configuration getting fixed?
neuhaus commentedon Aug 4, 2026
This issue remains open and critical.
github-actions commentedon Oct 4, 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.