opencode icon indicating copy to clipboard operation
opencode copied to clipboard

ESC isn't interupting anything

Open astray-heavy-arms opened this issue 1 year ago • 16 comments

No matter how many time I button bash the ESC key it -stops nothing- 0.2.23

astray-heavy-arms avatar Jul 10 '25 18:07 astray-heavy-arms

what model?

thdxr avatar Jul 10 '25 19:07 thdxr

I'm on a M1 Mac Pro using ghostty

astray-heavy-arms avatar Jul 10 '25 19:07 astray-heavy-arms

It was happening for me with Copilot GPT 4.1 testing the beast mode. Claude was ok though.

xdave avatar Jul 10 '25 23:07 xdave

It happens to me a lot (claude-opus-4-20250514).

almirsarajcic avatar Jul 11 '25 05:07 almirsarajcic

Same for me, 0.2.27 version, Ghostty, MacOS

divaltor avatar Jul 11 '25 08:07 divaltor

GPT-4o

astray-heavy-arms avatar Jul 11 '25 08:07 astray-heavy-arms

Usually does end up interrupting eventually if you wait long enough but the longer the session has been the longer it seems to take on my end.

editnori avatar Jul 14 '25 03:07 editnori

hm im having trouble reproducing this - do you guys notice if it's while the model is doing something specific?

thdxr avatar Jul 14 '25 03:07 thdxr

This is an easy to cause example I checked out the code of a git repo vllm (https://github.com/vllm-project/vllm) and then asked claude sonnet 4 to review the code. It is completely un-interruptible whilst its processing.

I am on ssh-ed to a remote linux (ubuntu 24.04) host (vm) where I am running opencode

bdeluca avatar Jul 14 '25 05:07 bdeluca

hm im having trouble reproducing this - do you guys notice if it's while the model is doing something specific?

Yes it's while its doing a very very very long or complex response. It's almost like the interupt has to "wait" until opencode finishes processing before it interupts. Which I'd say is a bit of an issue just needs to be when i tap escape it stops dead. Even a killswitch shift+ESC to kill the process so it does stop dead in it's tracks. I think it needs this safe guard.

astray-heavy-arms avatar Jul 14 '25 08:07 astray-heavy-arms

once its in this state, it cant be interrupted at all, I have held down escape and watched it get stuck in a loop, making changes, deploying something, testing it, killing it, making changes etc. I can hold down escape and I can never break free.

bdeluca avatar Jul 14 '25 08:07 bdeluca

see #888 same issue

bdeluca avatar Jul 14 '25 14:07 bdeluca

Yep, still happening on 0.4.1 (running here on Debian), Esc to interrupt never works.

gabrielmontagne avatar Aug 08 '25 05:08 gabrielmontagne

I'd like to mention that on newer versions -- I haven't done a bisect, though! -- I can't reproduce this anymore.

It's working fine for me on the two contexts I use (WSL and Linux)

gabrielmontagne avatar Dec 16 '25 11:12 gabrielmontagne

i’ll close for now

rekram1-node avatar Dec 16 '25 12:12 rekram1-node

cool, thanks. this could probably trickle to a bunch of quasi-duplicates, https://github.com/sst/opencode/issues/1179 etc.

gabrielmontagne avatar Dec 16 '25 14:12 gabrielmontagne