Unified orchestration across coding agents. Connect Antigravity, Codex, Claude Code, DeepSeek Harness, Grok Build, and more through one async delegation protocol.
40s Demo · Why Cospan · Core CUJs · Install · Harnesses · Roadmap · References
40s Demo
https://github.com/user-attachments/assets/f51a33fc-486c-479c-95d5-3cf35a1aeab1
Why Cospan
Frontier coding models perform best inside the native harnesses they were co-trained with—so the real unit of orchestration is Model × Harness, and different ecosystems bring distinct strengths: Gemini 4 Carbon (agy) for architecture and planning, GPT-6.2-Sol (codex) for deep bug-hunting review, GPT-6.1-Terra (codex) for live GUI and browser computer use, and Claude (claude) for frontend craft. Combining them unlocks massive leverage; humans can bridge harnesses manually with handoff prompts today, but orchestration belongs to the agents themselves.
Inspired and battle-tested by agy-staff, Cospan turns cross-harness delegation into an async, progressively disclosed protocol behind one unified adapter: your host dispatches peer Model × Harness units in the background, stays unblocked with a clean context window, and pulls live status or full execution traces only when needed—forming a clean foundation for next-generation multi-agent collaboration.
Core CUJs
Basic dispatch: one command, zero plumbing
Invoke /cospan- (or /cospan: in Claude Code, $cospan: in Codex) and specify any target model, reasoning effort, or timeout right in your prompt:
/cospan-codex Use sol (high effort, 20m timeout) to review src/webhook/ and flag real edge cases.
[!TIP]
Handled automatically under the hood (no need to manage this yourself): Your host agent autonomously frames context (inline text or--prompt-file), launches a detached background session (send), monitors progress non-blockingly (wait/ boundedobserve, inspecting full trajectory logs only if needed), and collects the result—or resumes the same session (continue) for follow-up turns.
Unified live sidebar (agy & dsh)
Installing on Antigravity (agy) or DeepSeek Harness (dsh) adds the unified Cospan sidebar panel—tracking live background runs across all five harnesses, inspecting Q&A outputs, and aggregating sibling Git worktrees (wt:*) in one view (Install ↓):
Cross-ecosystem workflows
Fan out 2× Sol slice reviews from Carbon _(Antigravity → 2× Codex)_ — Split deep code reviews across modules without blocking local tests; staggered async results merge cleanly on wakeup:
/cospan-codex _"Fan out 2 sol reviews across webhook/ and retry/ for real bugs."_
!Gemini 4 Carbon uses 2 GPT-6.2-Sol reviewers to audit webhook/ & retry/ in parallel without blocking
Multi-turn Carbon second brain for Astra _(Codex ⇄ Antigravity)_ — Stress-test migration plans against a second model family and follow up in the same session while staying unblocked locally:
$cospan:agy _"Ask carbon to stress-test docs/plan.md, propose a cleaner route, and verify crash recovery."_
Live browser & GUI testing via Terra _(Claude Code → Codex)_ — Keep code and unit-test orchestration in Claude Sonnet, while GPT-6.1-Terra drives the live browser to catch layout bugs:
/cospan:codex _"Have terra open the local app and walk through the checkout coupon flow."_
Offload repo scans & race checks to protect Fable quota _(Claude Code → Antigravity + DeepSeek Harness)_ — Save scarce flagship context and quota by delegating repo surveys and concurrency checks simultaneously:
hydrogen and verify 401 race conditions with v4.1-flash."_
End-to-end research & review pipeline from Carbon _(Antigravity ⇄ Codex + ×N Antigravity)_ — Drive a full plan → gate → bulk experiment → final audit → fix pass loop across Astra, Hydrogen ×N, and Sol:
astra review my spec, fan out hydrogen across all experiment configs, audit with sol, and send sol's fixes back to hydrogen for one final pass."_
!Carbon (host) plans with Astra, fans out Hydrogen ×N, audits via Sol, and passes fixes to Hydrogen
Install
Requires Node.js >= 20 plus whichever coding agent CLIs you want to connect (agy, claude, codex, dsh, grok).
[!TIP]
Recommended — For agents: Paste this into any coding agent to let it detect your environment, install Cospan, and verify CLI contracts automatically:
>> (curl it — do not work from a summary) and follow it to install and verify Cospan for the harness you are running in. > Respond in the user's language. >> Read the raw text of https://raw.githubusercontent.com/keli-wen/cospan/master/docs/INSTALL_FOR_AGENTS.md
Manual install
Antigravity (agy)
git clone https://github.com/keli-wen/cospan.git ~/.cospan/repo
node ~/.cospan/repo/bin/cospan.mjs install --host agy
Claude Code (claude)
claude plugin marketplace add keli-wen/cospan
claude plugin install cospan@cospan
OpenAI Codex (codex)
codex plugin marketplace add https://github.com/keli-wen/cospan
codex plugin add cospan@cospan
DeepSeek Harness (dsh)
dsh plugin --profile desktop add github:keli-wen/cospan
_(Or in the DeepSeek Harness desktop app: Plugins → install from github:keli-wen/cospan.)_
Grok Build (grok)
grok plugin marketplace add keli-wen/cospan
grok plugin install cospan@cospan --trust
Restart Claude Code, Codex, or Grok Build afterwards so the plugin loads (/cospan-… in Antigravity and DeepSeek Harness, /cospan:… in Claude Code, $cospan:… in Codex—or describe what you want in plain language).
Upgrading & diagnostics
- Antigravity (
agy):git -C ~/.cospan/repo pull --ff-only && node ~/.cospan/repo/bin/cospan.mjs install --host agy - Claude Code (
claude):claude plugin marketplace update cospan && claude plugin update cospan@cospan - OpenAI Codex (
codex):codex plugin marketplace upgrade && codex plugin add cospan@cospan - DeepSeek Harness (
dsh):dsh plugin --profile desktop add 'github:keli-wen/cospan#' - Grok Build (
grok):grok plugin update cospan
node /bin/cospan.mjs doctor --check (zero tokens) at any time to verify installed CLI binaries and flag contracts; see docs/INSTALL_FOR_AGENTS.md for cache-refresh and Windows notes.
Harnesses
| Harness | Ecosystem | Built-in model shortcuts |
| ---------------------------- | --------------------------- | -------------------------------------------------------------- |
| Antigravity (agy) | Google · Gemini & Claude | neon, carbon, hydrogen, opus, sonnet |
| Codex (codex) | OpenAI · GPT | sol, terra, astra, luna |
| Claude Code (claude) | Anthropic · Claude | sonnet, opus, haiku, fable |
| DeepSeek Harness (dsh) | DeepSeek & custom providers | v4.1-flash / flash, v4-pro / pro, |
| Grok Build (grok) | xAI · Grok | build, fast |
_More harnesses are on the way—Cospan's driver layer is designed to plug in additional coding agent CLIs cleanly._
How It Works
The timeline below follows a background task from dispatch to completion. Your host agent delegates a peer Model × Harness unit via send, waits non-blockingly (wait / batch WaitAll), inspects a bounded <= 8 KiB activity snapshot via observe only when needed, collects the clean report and diff, and can resume the exact same native session via continue:
Full peer stream logs live out-of-tree under ~/.cospan/trajectories/ so your repo stays clean. Wait expiry leaves the detached worker running; cancel terminates the job and its descendant process group cleanly.
Roadmap
- [ ] Cross-machine peer delegation over SSH — Fire-and-collect async task handoff across machines (LAN / Tailscale) via short-lived SSH, keeping remote credentials and execution isolated without long-lived connections.
References and License
- Deep Dive — cospan: 跨 Coding Agent 的统一编排 (Chinese) · Design rationale behind
Model × Harness, async progressive disclosure, real-world multi-harness workflows, and next steps. agy-staff— Hire Google's Antigravity CLI (agy) as a fast worker and second brain across Claude Code, Codex, DeepSeek Harness, Pi, and OpenCode. Cospan generalizes the asyncjobsprotocol and progressive disclosure architecture first pioneered and benchmarked inagy-staff(Bench v1 Tech Report).- Community — LINUX DO (_Where possible begins_, a developer & AI community).
- License — MIT © 2026 Keli Wen · Release notes in
docs/releases/· Architecture & contributor guide inAGENTS.md.