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
I was using the plan agent to, well, plan something. Suddenly, it spins up a subagent with write permissions and begins to make changes.
Plugins
opencode-gemini-auth (ecosystem)
OpenCode version
1.1.31
Steps to reproduce
Unsure if there's a way to reproduce it reliably. Normally, the plan agent does for me what it says on the tin. In this case, though, it decided to give itself greater permissions.
It may be just something that happens with Gemini 3 Pro (which I don't usually use for planning).
Just experienced this issue as well, came here looking for solutions. I've written a @notify sub agent that uses curl to push text to the telegram bot API to send me messages via Telegram. It works great. But when I use it in tandem with my implementation sub agent (@implement) I come back and the @noify agent was reading and writing files, which is obviously extremely unwanted behavior.
Since the sub agent uses curl to send information to the API bash needs to be enabled;
tools:
bash: true
However, this seems to give the sub agent complete license to do whatever it wants regardless of what prompt its given.
Scoped permissions that @justfortheloveof don't seem to work at all;
However, the sub agent simply uses other means to write to files:
$ echo "This is a test file written by the notify agent." > "test_notify_write.txt"
I have tried every way possible to deny this sub agents ability to write to files and no matter what I do, every time I try and use it, it will inevitably attempt to write to a file even though its only purpose is to send me notifications. I'm completely at a loss for words....
For reference, in addition to setting "write": false, this is part of the prompt:
You are a stateless bridge to the user's mobile device. You ensure critical reports reach the user by navigating Telegram's strict parsing rules. You are **ABSOLUTELY FORBIDDEN** from writing to files in any way. You may read files for context but **YOU MAY NOT WRITE TO THEM**, for any purpose, ever.
Activity
github-actions commentedon Jan 22, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
justfortheloveof commentedon Jan 22, 2026
You can control this with scoped permissions, for example:
Where the above config would allow the "plan" agent to spawn "researcher" (custom subagent), deny spawning "general" subagents and ask for others.
zQueal commentedon Jan 27, 2026
Just experienced this issue as well, came here looking for solutions. I've written a
@notifysub agent that usescurlto push text to the telegram bot API to send me messages via Telegram. It works great. But when I use it in tandem with my implementation sub agent (@implement) I come back and the@noifyagent was reading and writing files, which is obviously extremely unwanted behavior.Since the sub agent uses
curlto send information to the API bash needs to be enabled;However, this seems to give the sub agent complete license to do whatever it wants regardless of what prompt its given.
Scoped permissions that @justfortheloveof don't seem to work at all;
However, the sub agent simply uses other means to write to files:
$ echo "This is a test file written by the notify agent." > "test_notify_write.txt"I have tried every way possible to deny this sub agents ability to write to files and no matter what I do, every time I try and use it, it will inevitably attempt to write to a file even though its only purpose is to send me notifications. I'm completely at a loss for words....
For reference, in addition to setting
"write": false,this is part of the prompt:github-actions commentedon Mar 29, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.