0dai swarm vs Claude Code subagents

Claude Code (CLI v2.1.139, May 2026) ships first-party subagents: Markdown files with YAML frontmatter, scoped tool access, per-agent model overrides, optional git-worktree isolation, and an in-process Agent tool that the main session uses to dispatch them.

0dai swarm is a file-queue task system: agents (any CLI — Codex, Claude Code, OpenCode, Aider, Qoder, Gemini) read and write JSON tasks in ai/swarm/queue/. There is no broker and no process supervisor — only files in the repo and the agent CLIs you already run.

Both solve overlapping problems with different premises. This page is the honest read on where each one fits.

TL;DR

  • Use Claude Code subagents when your team is all on Claude Code, you want zero-setup delegation inside one session, and per-agent tool restrictions are worth the lock-in.
  • Use 0dai swarmwhen agents from different CLIs must cooperate on the same repo, when you need the task queue and persona definitions in git alongside the code they touch, or when the operator wants an inspectable audit trail outside any single vendor's session.
  • The two compose. A Claude Code subagent can produce a 0dai swarm task for a Codex worker to pick up. The import adapter (below) covers the static configuration half of the round trip.

Feature matrix

CapabilityClaude Code subagents0dai swarm
Definition formatMarkdown + YAML frontmatterYAML persona files + JSON task records
Storage location.claude/agents/, ~/.claude/agents/, managed settings, plugins, --agents JSONtemplates/layer/ai/personas/*.yaml, ai/swarm/queue/*.json
Required CLIClaude CodeNone — any CLI that can read and write JSON files
Cross-CLI portabilityNone — runs only inside Claude CodeCodex, Claude Code, OpenCode, Aider, Qoder, Gemini, shell
Per-agent model overridemodel: sonnet | opus | haiku | <id> | inheritPersona declares preferred CLI; model picked by that CLI
Tool allowlist / denylisttools: / disallowedTools: enforcedNot enforced — depends on each CLI's permission settings
Permission mode per agentdefault | acceptEdits | auto | dontAsk | bypassPermissions | planInherits the picking CLI's permission mode
Isolationisolation: worktree auto-creates a temp worktreeWorktree per task is opt-in via 0dai swarm pick
Persistent memory per agentmemory: user | project | local at ~/.claude/agent-memory/Personas share ai/memory/; no per-persona dir
ConcurrencyCapped by the Claude Code session schedulerMany sessions, many CLIs, many machines — one file per task
Nested delegationSubagents cannot spawn subagentsAny worker can write a new task back to the queue
Hooks per agenthooks: frontmatterRepo-wide hooks; no per-persona hooks
Scoped MCP serversmcpServers: frontmatter; inline or by referenceAll workers inherit the repo's .mcp.json
Audit trailSession transcript onlyai/swarm/log/*.jsonl is git-tracked; activity feed via MCP
Operator review gateInherits the parent session's review pathTier-gate / ghost-veto inspects tasks before merge
Vendor couplingTied to Claude Code release cadenceTied to 0dai release cadence; CLIs swappable

Where Claude Code subagents are strictly better

  • Tool sandboxing. tools, disallowedTools, and permissionMode are enforced by the Claude Code runtime. 0dai swarm has no equivalent.
  • Setup cost. A Markdown file in .claude/agents/ is one commit and zero new processes.
  • In-session feedback. A subagent returns its summary into the parent transcript. A swarm worker writes to a queue file and may finish minutes or hours later.

Where 0dai swarm is strictly better

  • Cross-CLI work. A Claude Code subagent cannot delegate to Codex. A swarm task can be picked up by Codex, OpenCode, or a human.
  • Git-native audit. Every task lifecycle event is a file change. git log ai/swarm/ is the history.
  • Multi-host fanout. Workers do not need to share one CLI session or one machine.
  • Persona inheritance. templates/layer/ai/personas/*.yaml carries references, defers_to, escalates_to, and role policy. Claude Code subagent files carry a system prompt; the social structure is implicit.

Honest gaps in 0dai swarm

The matrix marks these — they are not hidden in the body:

  • No per-persona tool restriction. If you need a researcher that provably cannot write to disk, use a Claude Code subagent with tools: Read, Grep, Glob and Write denied. 0dai swarm cannot enforce that.
  • No per-persona memory directory — personas share ai/memory/.
  • No in-session summary return — workers return through the queue.
  • No first-party UI. Claude Code ships /agents and claude agents. 0dai swarm relies on 0dai swarm status and the dashboard.

Import adapter

Phase 2 of issue 2197 ships 0dai import claude-code-agents. The shape of the conversion is documented below so the contract is reviewable before the code lands. Source files are .claude/agents/*.md (project) or ~/.claude/agents/*.md (user). Targets are ai/personas/<name>.yaml.

Claude Code frontmatter0dai persona YAMLNotes
namenameReserved names collide and abort with a diff suggestion.
descriptiondescriptionCopied verbatim.
modelpreferred_modelinherit becomes unset.
tools / disallowedToolstools.allow / tools.denyRecorded; not enforced at swarm dispatch.
permissionModepermission_modeConsumed only when the picking CLI is Claude Code.
mcpServersmcp_serversString references resolve against .mcp.json.
hooksdropped0dai hooks are repo-wide; importer prints a warning.
memorymemory_scopelocal becomes project with a warning.
Markdown bodysystem_prompt_additionInlined verbatim.

Round-trip is preserved by storing the original frontmatter under claude_code: so 0dai sync can regenerate .claude/agents/<name>.md without information loss.

Decision table

SituationRecommendation
Solo developer, all-Claude-Code workflowClaude Code subagents
Team uses Claude Code and Codex side-by-side0dai swarm + persona library
Need to provably restrict tools per agentClaude Code subagents
Need an inspectable, git-tracked audit trail0dai swarm
Tasks span multiple days or hosts0dai swarm
Tasks return inside one transcriptClaude Code subagents
Operator must veto before merge0dai swarm (tier-gate / ghost-veto)

References