Keeps running api in foreground despite telling it not to and blocks itself #2579

Open
opened 2026-02-16 17:36:19 -05:00 by yindo · 6 comments
Owner

Originally created by @perbinder on GitHub (Nov 4, 2025).

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

Originally created by @perbinder on GitHub (Nov 4, 2025). ### 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_
yindo added the model-problem label 2026-02-16 17:36:19 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2025):

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.

@github-actions[bot] commented on GitHub (Nov 4, 2025): 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.
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

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.

@rekram1-node commented on GitHub (Nov 4, 2025): 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.
Author
Owner

@perbinder commented on GitHub (Nov 4, 2025):

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 commented on GitHub (Nov 4, 2025): 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: > ***@***.***> >
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

@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

@rekram1-node commented on GitHub (Nov 4, 2025): @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
Author
Owner

@perbinder commented on GitHub (Nov 4, 2025):

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:
@.***>

@perbinder commented on GitHub (Nov 4, 2025): 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: > ***@***.***> >
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

let me know fi that works for u!

@rekram1-node commented on GitHub (Nov 4, 2025): let me know fi that works for u!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2579