| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: Related PR:
This appears to be related since it also addresses interrupting subagent sessions. However, PR #32425 seems to be a broader feature implementation for subagent interruption, while PR #32767 (the current PR) is a bug fix restoring ESC key functionality that regressed. They may be complementary rather than duplicates, but worth reviewing to ensure they don't conflict or overlap in scope. |
Sorry, something went wrong.
|
While #32425 is the real deal (steer, cancel, abort, transcript markers) this PR is more lightweight. |
Sorry, something went wrong.
|
@simonklee @nexxeln @rekram1-node I'm sorry to address you directly like this, but I'm truly convinced that this little feature is very useful for all users. If you start multiple subagents or reviewers and one or two of them get stuck in a loop, for example (we're looking at you, Kimi), it makes a lot of sense to cancel them selectively. This is a regression, since the feature was already available in the past. Could one of you please take a look at this? |
Sorry, something went wrong.
ESC could not stop delegated subtasks because the session.interrupt binding was only registered inside the prompt composer, which is hidden for child sessions. Add a dedicated useBindings layer in the session route that remaps the configured session.interrupt key (default: Escape) to a new command session.child.interrupt, scoped to child sessions via command-level enabled gating. The enabled flag sits on the command, not the layer, so the binding stays registered once and useCommandShortcut always resolves the shortcut. This mirrors the prompt's session.interrupt pattern. Double-press logic (first press arms a 5s timer, second press fires session.abort) mirrors the parent prompt behavior. On abort the pending permission and question entries are cleared immediately. The SubagentFooter shows dynamic 'escape interrupt' / 'escape again to interrupt' feedback when the subagent session is busy.
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #3699 and #4073 and #23534
Type of change
What does this PR do?
This fixes a regression. The functionality was there before and has gone some releases ago.
ESC could not stop delegated subtasks because the session.interrupt binding was only registered inside the prompt composer, which is hidden for child sessions. Subagent sessions had no ESC handler at all (but they had in the past).
Add a dedicated useBindings layer in the session route that remaps the configured session.interrupt key (default: Escape) to a new command session.child.interrupt, scoped to child sessions that are not idle.
Well-known double-press logic (first press arms a 5 s timer, second press fires session.abort) mirrors the parent prompt behavior. On abort the pending permission and question entries for the subagent are cleared immediately so the parent thread does not deadlock.
The SubagentFooter shows dynamic esc interrupt / esc again to interrupt feedback with the actual bound key.
How did you verify your code works?
Compiled & battle tested.
Screenshots / recordings
UPDATE: Upon requestion, I'm using escape now (OpenTUI default). Also, I'm writing Interrupt escape (keybind on the right side). So it matches the existing keybinds.
Checklist