opencode icon indicating copy to clipboard operation
opencode copied to clipboard

press ESC again to interrupt does not work

Open codyseally opened this issue 1 year ago • 24 comments

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.

codyseally avatar Jul 11 '25 15:07 codyseally

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

thdxr avatar Jul 12 '25 00:07 thdxr

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.

codyseally avatar Jul 12 '25 08:07 codyseally

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

nitsanavni avatar Jul 12 '25 09:07 nitsanavni

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

bdeluca avatar Jul 12 '25 10:07 bdeluca

I have the same problem with Sonnet 4.

MatejBransky avatar Jul 14 '25 09:07 MatejBransky

Ya running into this with sonnet 4

izakfilmalter avatar Jul 14 '25 14:07 izakfilmalter

Having same issue with Claude Opus 4.

furai avatar Jul 14 '25 14:07 furai

Me too

chriscarrollsmith avatar Jul 14 '25 15:07 chriscarrollsmith

Same issue with Sonnet 4

rossvz avatar Jul 14 '25 18:07 rossvz

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

adamdotdevin avatar Jul 14 '25 23:07 adamdotdevin

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

furai avatar Jul 15 '25 05:07 furai

works better here too

nitsanavni avatar Jul 15 '25 08:07 nitsanavni

Fixed for me.

izakfilmalter avatar Jul 15 '25 08:07 izakfilmalter

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.

PhunkyBob avatar Jul 16 '25 09:07 PhunkyBob

Still having issue same as @PhunkyBob

RoRep1ay avatar Jul 22 '25 04:07 RoRep1ay

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

gabrielmontagne avatar Aug 05 '25 23:08 gabrielmontagne

I faced this issue today with Grok Code

nikhilmaddirala avatar Sep 07 '25 18:09 nikhilmaddirala

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

nandilugio avatar Oct 15 '25 21:10 nandilugio

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

rekram1-node avatar Oct 15 '25 22:10 rekram1-node

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

nandilugio avatar Oct 16 '25 19:10 nandilugio