Quick summary of why it matters for anyone running structured multi-agent workflows.
The problem
Even with clear agent instructions ("lead goes first, then explorer, then builder, then reviewer"), the actual entry point is controlled by config — not prose. Without the right default, your AI tool picks whoever it thinks should start. That's rarely lead.
New features
Claude Code: The correct field for setting the default session agent is agent: "lead" in .claude/settings.json. Not default_agent in mcp.json — that key doesn't exist in Claude Code's documented config spec. It gets silently ignored.
OpenCode: default_agent: "lead" in opencode.json — already correct, and also supports compaction.{auto, prune, reserved} for managing context pressure in long sessions.
Codex CLI (new provider): No default_agent field exists. Instead, you create .codex/agents/default.toml with your lead agent's instructions. Codex has a built-in default agent; naming your file default.toml overrides it cleanly.
Per-role sandbox
Each agent also gets its own permission scope:
| Agent | Claude Code permissionMode | Codex sandbox_mode |
|---|---|---|
| lead | plan (read-only) | read-only |
| explorer | plan (read-only) | read-only |
| builder | acceptEdits | workspace-write |
| reviewer | plan (read-only) | read-only |
Why it matters
Correct orchestration on the first prompt = no re-starts = no wasted tokens re-explaining who should be doing what. The model is the same. The setup is what changes the output quality on the first try.
Check it out:
Website: stack.cardor.dev
No responses yet.