Hi team, I built a set of agent-orchestration features in my fork for my own work. Sharing in case it helps someone. Happy to split into PRs if anything looks interesting upstream, no pressure either way.
Fork (branch better): https://github.com/KapilSareen/opencode-extended
I checked each item against current upstream dev before posting; none of these exist there (upstream still injects background results via a fresh prompt(), has no background/monitor/sleep/cron/notify_parent tools, no per-agent isolation flag, bare cancel on abort, and hides completed tool blocks including diffs).
What is in it:
- Non-blocking background subagents: completion notices are written durably and picked up mid-drain instead of going through a fresh
prompt() (fixes model-reset, cache-bust and parked-injection races), plus a timeout that upgrades stuck foreground tasks to background instead of hanging the parent.
background tool (status with spend/tokens/recent activity, send, kill, list, tail, detach, by task_id or spawn name) and notify_parent so running children can push milestones to their parent.
monitor tool/service: watch a process, stream matching lines into a session, process-group kill. Plus cron scheduling and sleep keep-alive with early wake on new input.
- Per-agent automatic worktree isolation (default on, falls back outside git): subagents run in detached linked worktrees, removed when clean. (Upstream worktrees exist as a manual feature; this adds the per-agent flag and lifecycle.)
- ESC drains queued input instead of stranding it (programmatic aborts/kills still stay dead).
- Completed diffs stay visible in the TUI when tool details are hidden.
Everything is in separated commits with integration tests. Let me know if any of it would help upstream and how you would like it shaped. Thanks for opencode!
Hi team, I built a set of agent-orchestration features in my fork for my own work. Sharing in case it helps someone. Happy to split into PRs if anything looks interesting upstream, no pressure either way.
Fork (branch
better): https://github.com/KapilSareen/opencode-extendedI checked each item against current upstream
devbefore posting; none of these exist there (upstream still injects background results via a freshprompt(), has no background/monitor/sleep/cron/notify_parent tools, no per-agent isolation flag, bare cancel on abort, and hides completed tool blocks including diffs).What is in it:
prompt()(fixes model-reset, cache-bust and parked-injection races), plus a timeout that upgrades stuck foreground tasks to background instead of hanging the parent.backgroundtool (status with spend/tokens/recent activity, send, kill, list, tail, detach, by task_id or spawn name) andnotify_parentso running children can push milestones to their parent.monitortool/service: watch a process, stream matching lines into a session, process-group kill. Pluscronscheduling andsleepkeep-alive with early wake on new input.Everything is in separated commits with integration tests. Let me know if any of it would help upstream and how you would like it shaped. Thanks for opencode!