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
working getting stuck and double esc not exiting #1418
Im using opencode inside a zed terminal. sometimes opencode just gets stuck on working and doesn't output any steps that it is doing anything but when I try and hit escape twice to exit nothing happens.
For me, this regularly happens when opencode is executing bash commands. Neither Esc; Esc nor Ctrl + C; Ctrl + C --> opencode --> /sessions --> (select and Enter) can solve this.
does not. It continues to show working… and hitting Esc only toggles between "esc interrupt" and "esc again interrupt". Even when quitting opencode with ^C, the process is still running after the TUI already quit, and has be be terminated with ^C again. Screenshot attached.
Let me know if you need any further info or if I can run any tests.
I'm using opencode via Windows Terminal and am experiencing the same issue, except it's on every prompt. Still occurs as of v0.3.131. Sending a new message seems to resolve it though.
Seeing the same issue but it gets jammed up immediately on a prompt, and outside of the TUI mode when just doing opencode run "test". Happens with Antropic API key, and with local ollama model. On Opencode versions 0.3.133 and 0.2.28. No errors in the logs. Ubuntu 22.04, ghostty terminal and built-in terminal
`opencode run "test" --print-logs` output
INFO 2025-08-07T21:13:23 +58ms service=app cwd=/home/anson creating
INFO 2025-08-07T21:13:23 +0ms service=default version=0.2.28 args=run,test,--print-logs opencode
INFO 2025-08-07T21:13:23 +0ms service=app cwd=/home/anson creating
INFO 2025-08-07T21:13:23 +3ms service=app git=/home/anson git
INFO 2025-08-07T21:13:23 +0ms service=app git=/home/anson git
INFO 2025-08-07T21:13:23 +1ms service=app name=config registering service
INFO 2025-08-07T21:13:23 +1ms service=bus type=storage.write subscribing
INFO 2025-08-07T21:13:23 +0ms service=app name=bus registering service
INFO 2025-08-07T21:13:23 +0ms service=format init
INFO 2025-08-07T21:13:23 +0ms service=bus type=file.edited subscribing
INFO 2025-08-07T21:13:23 +0ms service=config.hooks init
INFO 2025-08-07T21:13:23 +0ms service=bus type=file.edited subscribing
INFO 2025-08-07T21:13:23 +0ms service=bus type=session.idle subscribing
INFO 2025-08-07T21:13:23 +0ms service=app name=lsp registering service
INFO 2025-08-07T21:13:23 +0ms service=session id=ses_7799e589affen90KdplGFEATdJ version=0.2.28 title=New Session - 2025-08-07T21:13:23.557Z time=[object Object] created
INFO 2025-08-07T21:13:23 +0ms service=app name=session registering service
INFO 2025-08-07T21:13:23 +0ms service=app name=storage registering service
INFO 2025-08-07T21:13:23 +2ms service=config loaded
INFO 2025-08-07T21:13:23 +0ms service=bus type=storage.write publishing
INFO 2025-08-07T21:13:23 +0ms service=app name=config registering service
INFO 2025-08-07T21:13:23 +0ms service=config loaded
INFO 2025-08-07T21:13:23 +0ms service=bus type=session.updated publishing
█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀
>test
INFO 2025-08-07T21:13:23 +0ms service=app name=provider registering service
INFO 2025-08-07T21:13:23 +3ms service=models.dev refreshing
INFO 2025-08-07T21:13:23 +0ms service=provider init
INFO 2025-08-07T21:13:23 +2ms service=provider providerID=anthropic found
@ anthropic/claude-sonnet-4-20250514
INFO 2025-08-07T21:13:23 +0ms service=bus type=message.part.updated subscribing
INFO 2025-08-07T21:13:23 +0ms service=bus type=session.error subscribing
INFO 2025-08-07T21:13:23 +0ms service=app name=mode registering service
INFO 2025-08-07T21:13:23 +2ms service=session session=ses_7799e589affen90KdplGFEATdJ chatting
INFO 2025-08-07T21:13:23 +0ms service=provider providerID=anthropic modelID=claude-sonnet-4-20250514 getModel
INFO 2025-08-07T21:13:23 +0ms service=provider status=started providerID=anthropic getSDK
INFO 2025-08-07T21:13:23 +54ms service=provider status=completed duration=54 providerID=anthropic getSDK
INFO 2025-08-07T21:13:23 +0ms service=provider providerID=anthropic modelID=claude-sonnet-4-20250514 found
INFO 2025-08-07T21:13:23 +3ms service=session session=ses_7799e589affen90KdplGFEATdJ sessionID=ses_7799e589affen90KdplGFEATdJ locking
INFO 2025-08-07T21:13:23 +6ms service=bus type=storage.write publishing
INFO 2025-08-07T21:13:23 +0ms service=bus type=message.updated publishing
Same issue here, I could not cancel, stop 'generating' tasks and even when I can stop them which is when its not 'generating' this brings a terrible user experience 1000%. It's so frustrating we can't stop whenever we want and on top of that the costs to the company increase as it keeps generating without user intent. And sometimes it slows down ad keep writing forever like minutes literally and you can't do anything but ctrl c and exit application. I'm working on a patch to this, would love to contribute with this project as I use extensively on daily basis. If streaming/generating, it should 'stop/kill' stream.
Activity
cpursley commentedon Jul 30, 2025
It's also getting stuck for failed file uploads and there's no way to get out/move on.
adamdotdevin commentedon Jul 31, 2025
i believe dax fixed this yesterday, can someone confirm in latest?
anschmieg commentedon Aug 5, 2025
For me, this regularly happens when opencode is executing bash commands. Neither
Esc; EscnorCtrl + C; Ctrl + C-->opencode-->/sessions--> (select andEnter) can solve this.thdxr commentedon Aug 5, 2025
is it any bash command? or specific ones
anschmieg commentedon Aug 5, 2025
@thdxr I'm not quite sure. I suspected it might be python or curl commands, but prompts that lead to:
and
return valid outputs, while
does not. It continues to show
working…and hittingEsconly toggles between "esc interrupt" and "esc again interrupt". Even when quitting opencode with^C, the process is still running after the TUI already quit, and has be be terminated with^Cagain. Screenshot attached.Let me know if you need any further info or if I can run any tests.
ezra-en commentedon Aug 6, 2025
I'm using opencode via Windows Terminal and am experiencing the same issue, except it's on every prompt. Still occurs as of v0.3.131. Sending a new message seems to resolve it though.
MisterBiggs commentedon Aug 7, 2025
Seeing the same issue but it gets jammed up immediately on a prompt, and outside of the TUI mode when just doing
opencode run "test". Happens with Antropic API key, and with local ollama model. On Opencode versions 0.3.133 and 0.2.28. No errors in the logs. Ubuntu 22.04, ghostty terminal and built-in terminal`opencode run "test" --print-logs` output
Then hangs and nothing happens
dBianchii commentedon Aug 18, 2025
happening with me. it says "working..." and doesn't output anything and hangs forever
devhe4d commentedon Aug 20, 2025
same issue here
adolfousier commentedon Oct 9, 2025
Same issue here, I could not cancel, stop 'generating' tasks and even when I can stop them which is when its not 'generating' this brings a terrible user experience 1000%. It's so frustrating we can't stop whenever we want and on top of that the costs to the company increase as it keeps generating without user intent. And sometimes it slows down ad keep writing forever like minutes literally and you can't do anything but ctrl c and exit application. I'm working on a patch to this, would love to contribute with this project as I use extensively on daily basis. If streaming/generating, it should 'stop/kill' stream.