-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
I did a search for several combinations of the search terms: abort, cancel, interrupt, task, subagent
Describe the enhancement you want to request
PR feat(opencode): Support background subagents was submitted earlier to support background tasks. However, there are some issues with task cancellation in that implementation, notably, that there would be no way to terminate, interrupt, abort background tasks without closing the app. This could lead to time and token waste when users want to stop tasks.
Given this, it makes sense to start by supporting some way of cancelling individual subagents, even just foreground/synchronous ones, so that background tasks can make use of such support in the future.
For example, if we run a prompt like:
Run 2 general subagents in parallel. Each one should use bash to
sleep for an amount of time and then print out a random number. Have them sleep
for 30 seconds each. Then print out a chart of the results of the tasks.
We should be able to navigate to each subagent session and interrupt or abort the task to stop output.
Related issue: [feat] True Async/Background Sub-Agent Delegation