Skip to content

press ESC again to interrupt does not work #888

Closed

Description

@codyseally

I logged into my Ubuntu machine and played with opencode a bit (I updated it to the latest version). I notice that I press ESC once and it tells me to press again to interrupt the LLM. No matter how many times I press ESC, it just oscillate between (ESC / Press again to interrupt). I finally have to Ctrl+C.

Activity

  1. thdxr commented on Jul 12, 2025

    @thdxr
    Member

    what model is this with? i tried to replicate and i could not

  2. self-assigned this
    on Jul 12, 2025
  3. codyseally commented on Jul 12, 2025

    @codyseally
    Author

    I tried it with Devstral. It seems when being asked to use tools and it was not responding / thinking , the ESC mode did not work to stop it.

  4. nitsanavni commented on Jul 12, 2025

    @nitsanavni

    For me it's a hit and miss, most of the time it doesnt pick-up my double ESC.

  5. bdeluca commented on Jul 12, 2025

    @bdeluca

    I am just holding down escape watching it spend an hour systematically destroy all the work it had done, with Sonnet 4

  6. MatejBransky commented on Jul 14, 2025

    @MatejBransky

    I have the same problem with Sonnet 4.

  7. izakfilmalter commented on Jul 14, 2025

    @izakfilmalter

    Ya running into this with sonnet 4

  8. furai commented on Jul 14, 2025

    @furai
    Contributor

    Having same issue with Claude Opus 4.

  9. chriscarrollsmith commented on Jul 14, 2025

    @chriscarrollsmith

    Me too

  10. rossvz commented on Jul 14, 2025

    @rossvz

    Same issue with Sonnet 4

  11. adamdotdevin commented on Jul 14, 2025

    @adamdotdevin
    Member

    this was fixed in a release today, can you all confirm?

  12. furai commented on Jul 15, 2025

    @furai
    Contributor

    So far seems to be working, will test more. Thank you!

  13. nitsanavni commented on Jul 15, 2025

    @nitsanavni

    works better here too

  14. izakfilmalter commented on Jul 15, 2025

    @izakfilmalter

    Fixed for me.

  15. PhunkyBob commented on Jul 16, 2025

    @PhunkyBob

    Debian on WSL2, Google's Gemini 2.5 pro preview 06-05 -> double Escape doesn't work for me with version v0.3.13 when it's "working..." for a long time without doing anything.

    My guess: when the model is unresponsive, double Escape doesn't work.

  16. RoRep1ay commented on Jul 22, 2025

    @RoRep1ay

    Still having issue same as @PhunkyBob

  17. gabrielmontagne commented on Aug 5, 2025

    @gabrielmontagne

    Same here, on Debian, 0.3.131, I can't cancel operations. Opencode runs off until it runs out of steam.

  18. nikhilmaddirala commented on Sep 7, 2025

    @nikhilmaddirala

    I faced this issue today with Grok Code

  19. nandilugio commented on Oct 15, 2025

    @nandilugio

    seeing this too using gpt 4.1 and grok code fast 1. I'm also not able to kill with ctrl-c

  20. rekram1-node commented on Oct 15, 2025

    @rekram1-node
    Collaborator

    @nandilugio not able to kill? Is the process just hanging or are you saying when u restart it still says "generating...."

  21. nandilugio commented on Oct 16, 2025

    @nandilugio

    @rekram1-node I mean that hitting Ctrl+C doesn't kill the application, not even when idle waiting for a prompt. Ctrl+C reaches the terminal because it works on other programs and on the shell. Seems like the signal is trapped but not handled somehow.

    Also, somehow, today double-Esc is working. Haven't upgraded or anything. Still on v0.15.3.

    Thx for checking! let me know if you need any more info.

  22. rekram1-node commented on Oct 16, 2025

    @rekram1-node
    Collaborator

    I noticed a few places that hangs can occur and Im cleaning them up

  23. added a commit that references this issue on Apr 7, 2026
  24. faizananwerali commented on May 16, 2026

    @faizananwerali

    it's still not working, i am mac, tried with all model, esc key doesn't work, i am working on JetBrain IDEs

  25. stepanjakl commented on May 29, 2026

    @stepanjakl

    Yes, the same issue persits for me too (MacOS, VS Code) - clicking on the esc text at the bottom would also be nice to have for interrupting the currently running process

  26. em commented on Aug 11, 2026

    @em

    Still doesn't work. Have to press repeatedly. The bug seems to be there's some concept of multiple items in some queue, and only last of some queue nobody knows exist is interrupted, not actually everything pending, so depending on whatever is happening, sometimes you need to esc esc esc popping some imaginary stack until it actually interrupts. Don't know what, never makes sense. Just know you gotta press it over and over. I have no idea the architecture but that's how it seems to behave and what's broken about it.

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