Summary
Background shell commands do return a call ID — but only on completion, not at launch. This means there is still no way to reference or cancel a running background command while it is executing.
New finding (v2 update)
When a background shell finishes, the completion notification includes a call ID:
id: call_00_GHYwLiUePO5p7d23ATlI7431
state: completed
command: sleep 60 && echo "done"
However, at launch time, the response is simply:
"The command was moved to the background. You will be notified automatically when the command finishes."
No ID, PID, or handle is provided at that point.
What this means
- The infrastructure does track background commands with an ID — it is simply not exposed at launch.
- If the ID were returned at launch (same as subagent's
ses_... ID), it could enable a kill/cancel mechanism.
- Currently, the only way to stop a background command is indirect —
pkill by name or kill by port — which is fragile and error-prone.
Desired behavior
- Return the call ID (e.g.
call_00_...) immediately when launching a background shell.
- Provide a mechanism (tool or parameter) to cancel/kill a running background command using that ID.
Environment
- opencode version: 0.0.0-next-15329 (v2 beta, next channel)
- OS: Linux 7.0.0-27-generic (x86_64, Ubuntu)
- Terminal: xterm-256color, truecolor
- Shell: /bin/bash
- Install/channel: next (v2 beta)
Summary
Background shell commands do return a call ID — but only on completion, not at launch. This means there is still no way to reference or cancel a running background command while it is executing.
New finding (v2 update)
When a background shell finishes, the completion notification includes a call ID:
However, at launch time, the response is simply:
No ID, PID, or handle is provided at that point.
What this means
ses_...ID), it could enable akill/cancelmechanism.pkillby name orkillby port — which is fragile and error-prone.Desired behavior
call_00_...) immediately when launching a background shell.Environment