Skip to content

working getting stuck and double esc not exiting #1418

Closed

Description

@willleeney

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.

Activity

  1. cpursley commented on Jul 30, 2025

    @cpursley

    It's also getting stuck for failed file uploads and there's no way to get out/move on.

  2. adamdotdevin commented on Jul 31, 2025

    @adamdotdevin
    Member

    i believe dax fixed this yesterday, can someone confirm in latest?

  3. self-assigned this
    on Aug 4, 2025
  4. anschmieg commented on Aug 5, 2025

    @anschmieg

    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.

  5. thdxr commented on Aug 5, 2025

    @thdxr
    Member

    is it any bash command? or specific ones

  6. anschmieg commented on Aug 5, 2025

    @anschmieg

    @thdxr I'm not quite sure. I suspected it might be python or curl commands, but prompts that lead to:

    Bash Runs a simple mathematical calculation in Python
    $ python -c "print(2 * (3 + 4) / 5)"

    and

    Bash Import openai_server.py and list its objects
    $ python -c "import sys; sys.path.insert(0, 'server'); import openai_server; print(dir(openai_server))"

    return valid outputs, while

    Bash Run the server and test /health and /v1/models endpoints
    $ python server/openai_server.py & sleep 5; curl -s http://localhost:6060/health; curl -s http://localhost:6060/v1/models

    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.

    Image
  7. ezra-en commented on Aug 6, 2025

    @ezra-en

    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.

  8. MisterBiggs commented on Aug 7, 2025

    @MisterBiggs

    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

    Then hangs and nothing happens

  9. dBianchii commented on Aug 18, 2025

    @dBianchii

    happening with me. it says "working..." and doesn't output anything and hangs forever

  10. devhe4d commented on Aug 20, 2025

    @devhe4d

    same issue here

  11. adolfousier commented on Oct 9, 2025

    @adolfousier

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions