Feature request: allow me to kill currently executing bash commands #1407

Closed
opened 2026-02-16 17:30:50 -05:00 by yindo · 9 comments
Owner

Originally created by @carterworks on GitHub (Aug 20, 2025).

I asked it to evaluate the quality of some tests in a PR. It decided to run the full test suite, which takes 15 minutes to complete.

Please give me a way to kill the currently executing command without exiting completely out of opencode. It's a good way from stopping the agent from doing something that would take a long time.

Cursor allows for this. Claude Code does not.

Originally created by @carterworks on GitHub (Aug 20, 2025). I asked it to evaluate the quality of some tests in a PR. It decided to run the full test suite, which takes 15 minutes to complete. Please give me a way to kill the currently executing command without exiting completely out of `opencode`. It's a good way from stopping the agent from doing something that would take a long time. Cursor allows for this. Claude Code does not.
yindo closed this issue 2026-02-16 17:30:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 20, 2025):

This issue might be a duplicate of or closely related to existing issues. Please check:

  • #1970: Feature Request: Add Background Bash Execution (Like Claude Code's Ctrl+b) - Similar request for managing long-running bash commands with reference to Claude Code's Ctrl+b feature
  • #682: TUI becomes unresponsive upon running a non-terminating process such as a web server - Reports same problem where ESC doesn't work to interrupt long-running processes
  • #848: ESC isn't interupting anything - Reports that ESC key doesn't interrupt bash commands at all
  • #684: interrupt sometimes has no effect - Reports unreliable interruption of running commands
  • #1721: bash tool often times out - Related to long-running bash commands, though focuses on timeout rather than manual interruption

Feel free to ignore if none of these address your specific case, but #1970 appears to be requesting very similar functionality.

@github-actions[bot] commented on GitHub (Aug 20, 2025): This issue might be a duplicate of or closely related to existing issues. Please check: - #1970: Feature Request: Add Background Bash Execution (Like Claude Code's Ctrl+b) - Similar request for managing long-running bash commands with reference to Claude Code's Ctrl+b feature - #682: TUI becomes unresponsive upon running a non-terminating process such as a web server - Reports same problem where ESC doesn't work to interrupt long-running processes - #848: ESC isn't interupting anything - Reports that ESC key doesn't interrupt bash commands at all - #684: interrupt sometimes has no effect - Reports unreliable interruption of running commands - #1721: bash tool often times out - Related to long-running bash commands, though focuses on timeout rather than manual interruption Feel free to ignore if none of these address your specific case, but #1970 appears to be requesting very similar functionality.
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

agreed, the double esc should make bash stop just like it does for llm response

@rekram1-node commented on GitHub (Aug 20, 2025): agreed, the double esc should make bash stop just like it does for llm response
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

Wait, @carterworks does the double esc not work for you? I can tell llm to run bash commands and then if I double esc it will abort it properly:

Image
@rekram1-node commented on GitHub (Aug 20, 2025): Wait, @carterworks does the double esc not work for you? I can tell llm to run bash commands and then if I double esc it will abort it properly: <img width="397" height="400" alt="Image" src="https://github.com/user-attachments/assets/eed5657d-b209-44b6-acdc-37683bd1a594" />
Author
Owner

@carterworks commented on GitHub (Aug 21, 2025):

It does! TIL

@carterworks commented on GitHub (Aug 21, 2025): It does! TIL
Author
Owner

@vasilvestre commented on GitHub (Dec 11, 2025):

Maybe it's due to TUI but it doesn't seem to work anymore.

@vasilvestre commented on GitHub (Dec 11, 2025): Maybe it's due to TUI but it doesn't seem to work anymore.
Author
Owner

@rekram1-node commented on GitHub (Dec 11, 2025):

Image

Hm definitely works for me, mind sharing your keybinds?

What terminal are u using?

@rekram1-node commented on GitHub (Dec 11, 2025): <img width="859" height="360" alt="Image" src="https://github.com/user-attachments/assets/fb9835b2-d209-4f08-b20d-a74908fdf255" /> Hm definitely works for me, mind sharing your keybinds? What terminal are u using?
Author
Owner

@vasilvestre commented on GitHub (Dec 12, 2025):

Oh ok I got the original issue wrong.

When you use someting like !npm update, you can't kill the process. (! is to run a "native" bash command)

@vasilvestre commented on GitHub (Dec 12, 2025): Oh ok I got the original issue wrong. When you use someting like `!npm update`, you can't kill the process. (! is to run a "native" bash command)
Author
Owner

@rekram1-node commented on GitHub (Dec 12, 2025):

@vasilvestre that should work too, if it isnt mind telling me are you on windows?

@rekram1-node commented on GitHub (Dec 12, 2025): @vasilvestre that should work too, if it isnt mind telling me are you on windows?
Author
Owner

@vasilvestre commented on GitHub (Dec 15, 2025):

@vasilvestre that should work too, if it isnt mind telling me are you on windows?

I tried it today and it's working... if it happens again, I will check why. It happened on a makefile running docker compose command which is a lot of TTY interaction. Thank you !

@vasilvestre commented on GitHub (Dec 15, 2025): > [@vasilvestre](https://github.com/vasilvestre) that should work too, if it isnt mind telling me are you on windows? I tried it today and it's working... if it happens again, I will check why. It happened on a makefile running docker compose command which is a lot of TTY interaction. Thank you !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1407