opencode: end calls dropped from a failed or cancelled background job

Commit

peyton-alt21h ago

A job that fails or is cancelled drops the joined runs still queued on it, so their calls got no idle of their own and stayed held until the child's next resume, whose work they then claimed. The plugin now ends every held call for a child when its job ends: on the synthetic <task ... state="completed|error"> result, or on a MessageAbortedError for the child or the session that launched it; for a busy child, at its next idle, since cancelling a job does not cancel a joined run already executing. A call that never prompted its child now declares an empty transcript instead of the child's full export.

The plugin also falls back to the task part's own start when it missed tool.execute.before, so the call start it reports is always OpenCode's clock.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M47FJNDP0P22VN2RGKZDZ8XB

Checkpoints

OpenCode Subagent Start and Stop Pairing

Claude CodeOpus 5.5
View session
Checkpoint 1