Advanced
Cross-Agent Spec Handoff
The spec documents are the handoff protocol. Any agent that can read markdown and call MCP tools can pick up a spec at any phase. This enables a workflow where different models handle different phases based on their strengths.
Cross-Agent Spec Lifecycle
Claude (Opus) — creates issue, writes requirements + design
│ (best at: understanding intent, architecture)
▼
Claude (Opus) — reviews design, writes tasks.md
│ (best at: breaking down complexity)
▼
Switch iTerm tab → Any agent can pick up tasks from here:
├── GLM (claude-glm) — implements tasks (tested, strong coder)
├── Kimi (kimi CLI) — implements tasks (262K context)
├── Codex (GPT-5.4) — implements tasks (mechanical, fast)
└── OpenCode (any) — pick model at runtime (Ctrl+O)
▼
Claude (Opus) — /codex:review, merge, /wrap
How handoff works
There's no custom IPC or message passing. The spec files (requirements.md, design.md, tasks.md) sit in the repo's .spec-workflow/ directory. When you switch terminals:
# In Codex terminal:
codex "@spec STAK-498"
# Codex reads tasks.md, implements next pending task, logs artifacts
# In GLM terminal (Kimi or OpenCode work the same way):
claude-glm # then: /spec STAK-498
kimi # then: /spec STAK-498
opencode # then: /spec STAK-498
# Every agent reads the same spec, sees what's [ ] vs [x]
# Implements the next pending task, logs artifacts
# Implementation logs prevent duplicate work
# In Claude terminal — review and merge:
/spec STAK-498
# Reads spec status, sees what was completed, reviews, merges
Implementation logging prevents conflicts
Every agent calls log-implementation after completing a task. The log records which files were modified, which API endpoints were created, and which components were built. The next agent reads these logs before starting — so it won't create a duplicate endpoint or reimplement a utility that another agent already built.
Session memory bridges the gap
The session memory pipeline ensures context transfers between agents. When Claude runs /wrap, it saves a digest to mem0 and the Obsidian vault. When any other CLI reads mem0, it gets the same memories. Same project tag, same mem0 account — cross-agent continuity across all six CLIs.
Start simple
You don't need six CLIs on day one. Start with Claude Code +
/codex:review for second-opinion reviews. Add
opencode as a backup CLI with model flexibility. Add Kimi or GLM when you want to delegate spec tasks. The MCP stack is the foundation — once it's set up, adding a new CLI is just copying a config file.