Keeps running api in foreground despite telling it not to and blocks itself
Description
See title
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
This issue might be a duplicate of existing issues. Please check:
- #3846: Both involve unresponsive behavior where the system doesn't respond to user input and appears stuck
- #3841: Related to server shutdown/restart issues and port blocking problems
- #3822: Both describe performance issues where the system slows down or becomes unresponsive during operation
- #3828: Similar blocking behavior where the agent gets stuck and becomes unresponsive
- #3761: Related to unclear states when the system is busy or waiting for input, which could manifest as appearing to run in foreground
Feel free to ignore if none of these address your specific case.
Telling it not to? Are you saying the model is running a server via the bash tool and u dont want that?
You should be able to stop it using "esc"
Also you can set permissions to block this from happening.
I don’t ask it to. It changes some code then decides to run the api and I have to stop it each time. Getting tiresome.
On Tue, 4 Nov 2025 at 15:17, Aiden Cline @.***> wrote:
rekram1-node left a comment (sst/opencode#3897) https://github.com/sst/opencode/issues/3897#issuecomment-3486509667
Telling it not to? Are you saying the model is running a server via the bash tool and u dont want that?
You should be able to stop it using "esc"
Also you can set permissions https://opencode.ai/docs/permissions/ to block this from happening.
— Reply to this email directly, view it on GitHub https://github.com/sst/opencode/issues/3897#issuecomment-3486509667, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBFZME6NQQU4WBBXB73XY5D33C7QHAVCNFSM6AAAAACLDQQ77OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOBWGUYDSNRWG4 . You are receiving this because you authored the thread.Message ID: @.***>
@perbinder it all depends on your model and setup I would say putting something in AGENTS.md for your project to tell it not to can be helpful, also you can straight up prevent it from happening all together using something like this in your opencode.json:
{
"permission": {
"bash": {
"npm run dev": "deny"
}
}
}
In this example the agent won't be able to run npm run dev you can replace this with your equivalent or use "*" wildcards to enforce wider restrictions
Thanks that’s a great idea
On Tue, 4 Nov 2025 at 16:00, Aiden Cline @.***> wrote:
rekram1-node left a comment (sst/opencode#3897) https://github.com/sst/opencode/issues/3897#issuecomment-3486751999
@perbinder https://github.com/perbinder it all depends on your model and setup I would say putting something in AGENTS.md for your project to tell it not to can be helpful, also you can straight up prevent it from happening all together using something like this in your opencode.json:
{ "permission": { "bash": { "npm run dev": "deny" } } }
In this example the agent won't be able to run npm run dev you can replace this with your equivalent or use "*" wildcards to enforce wider restrictions
— Reply to this email directly, view it on GitHub https://github.com/sst/opencode/issues/3897#issuecomment-3486751999, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBFZMEZMJA4YPG5BJGOHUIL33DESLAVCNFSM6AAAAACLDQQ77OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOBWG42TCOJZHE . You are receiving this because you were mentioned.Message ID: @.***>
let me know fi that works for u!