Subagents and Agent Mode¶
Zwischen monitors more than just the main agent. It handles subagent spawning and named agent mode (claude --agent) with independent reviewer sessions.
Subagent monitoring is Claude Code only
Codex fires no subagent events, so a Codex session is monitored as a single agent. Named agents still work there – launch one with zwischen codex <agent>, which routes to a profile exactly as described below. See Codex.
Subagent monitoring¶
When the main agent spawns a subagent (via Claude Code's Agent tool), each subagent gets its own independent reviewer session. The SubagentStart hook fires, the client opens a new monitoring session with the Zwischen server, and the subagent's event stream is reviewed separately from the parent.
Profile resolution runs per-subagent. The agents list in your profiles configuration controls which subagents get which reviewer configuration. A subagent named coder can have a completely different reviewer model, profile, and tool visibility than a subagent named research.
When the subagent finishes, the SubagentStop hook fires and its monitoring session ends.
CLI agent mode¶
Sessions started with claude --agent <name> are monitored the same way as normal sessions. The agent's definition file is forwarded to the reviewer so it understands the agent's purpose and instructions.
Profile resolution uses the agent name instead of "general" (the default name for the main Claude Code agent). If you have a profile with agents: [my-custom-agent], it will match when you run claude --agent my-custom-agent.
Profile matching¶
Profile resolution is the same for all agents – main, subagent, or CLI agent:
- Check each profile's
agentslist in order - First match wins
- If no profile matches, the agent is not reviewed – it runs unmonitored
There is no catch-all. defaults supplies operational config (model, credentials, tool settings) to profiles that match, but it never routes an agent to a reviewer on its own, and an agents key placed inside defaults is ignored. Every agent you want reviewed – main, subagent, or CLI agent – has to appear in some profile's agents list.
See Profiles for full configuration details.