Repository navigation
v0.1.0
Async, supervised background agent delegation for OpenCode — delegate, steer, stop, and persist sub-agent work.
Features
- Async delegation:
delegatelaunches a sub-agent in the background and returns an ID immediately; the supervisor stays free to keep working. - Interactive control:
delegation_status,delegation_peek,delegation_steer, anddelegation_stopto observe and course-correct running tasks without restarting them. - Persistent output: every delegation result is written to disk and retrievable via
delegation_read, surviving compaction. - Strict / relaxed routing: route read-only vs. write-capable sub-agents through
delegateor the nativetasktool (BACKGROUND_AGENTS_STRICT_READONLY). - State persistence & crash recovery: active delegations are mirrored to disk and re-adopted after a process restart.
- Per-delegation model override: pick the model per task (
provider/model-id), or fall back to the agent's configured model.
Fixes
- Server-side turn errors now surface as
error: a turn that fails on the server (e.g. a bad model override →ProviderModelNotFoundError) resolves the prompt with the failure on the assistant message instead of rejecting. These runs are now finalized aserrorwith the real message, rather than being mislabeled "complete with no output". - Wake-on-completion: a delegation that completes while siblings are still running now wakes the supervisor immediately, so an idle supervisor no longer stays dormant until the whole batch settles. The last completion stays silent and the single all-complete notification delivers the final wake (no double-wake).
Verification
- TypeScript typecheck clean.
- 46 tests passing across 5 files.