@vforsh/agentbus
v0.5.0
Published
Durable local mailbox and delegation bus between Codex and Claude Code sessions
Maintainers
Readme
agentbus
Durable local mailbox for delegating work between Codex and Claude Code sessions.
A parent session delegates a task to a worker; the worker's progress, questions and result come back to the parent's inbox. Every message is committed to SQLite before a receipt is printed and stays recoverable until acknowledged — nothing gets lost when a session dies, restarts or forgets to check.
- Delegate to
claudeorcodexwith one command; the worker gets a generated contract telling it how to reply. - Wake up on results: Claude parents arm a background
wait, Codex parents use an app heartbeat. - Follow up mid-task: Claude workers get new mail through a hook "doorbell";
successis refused until follow-ups are handled. - See what's going on:
delegations,explainandmetricsshow phase, stuck work and delivery latency.
Install
Requires Bun ≥ 1.4.2; developed and tested on macOS.
bun add -g @vforsh/agentbusagentbus upgradeagentbus init && agentbus doctorupgrade builds, smoke-tests and installs the standalone executable workers run, on the internal disk (background workers can't read external volumes). Re-run it after every update, with no workers running. From a checkout, use bun install && bun run upgrade instead. Details: docs/install.md.
Quick start
# Parent
agentbus session register --provider claude --external-id "$CLAUDE_CODE_SESSION_ID" --name lead
agentbus delegate --to codex --name executor --cwd ~/dev/project --key task-002 --file request.md --json
agentbus wait --ensure --timeout 30m --probe 60s --json # run in the background
# Worker (commands come from its <agentbus-contract> block)
<worker-bin> read --correlation <request-id>
<worker-bin> ask --summary "Keep the v1 routes?" --file question.md # waits for the answer
<worker-bin> finish --outcome success --summary "Parser fixed; tests pass" --file result.md
# Parent, mid-task or after waking
agentbus followup executor --summary "Use the staging DB" --file followup.md
agentbus take # results and questions in full, plus next steps
agentbus explain executor # timeline and why it's stuckAgents should load the bundled skill instead: skill/agentbus/SKILL.md.
Docs
| Doc | What's in it |
| --- | --- |
| CLI reference | Every command, flag semantics, exit codes |
| Protocol | Envelope, roles, delivery, return paths, support matrix |
| Install & upgrade | Locations, offline upgrades and recovery, Claude hooks, config |
| Metrics | agentbus metrics cohorts, fields and TSV format |
| Verification | Milestone status, bun run gate, live checks |
| PLAN.md · History | Design rationale and how it got here |
Development
bun run gateLint, typecheck, integration, e2e and compiled release checks against temporary stores; never touches ~/.claude or the real mailbox.
License
MIT. Fixtures and recorded evidence use synthetic identifiers and generic paths.
