Skip to content

Subagents and Agent Mode

Zwischen monitors more than just the main Claude Code agent. It handles subagent spawning and CLI agent mode (claude --agent) with independent reviewer sessions.

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, scrutiny level, 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 "orchestrator" (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:

  1. Check each profile's agents list in order
  2. First match wins
  3. If no profile matches, fall back to defaults
  4. The agents key in defaults controls which agents get reviewed when no profile matches — omit it to review all agents

See Profiles for full configuration details.