Skip to content

Project Agents and Subagents ​

A Project Agent is the definition every dispatched Run for a Project is created from. A Subagent is a named delegate the primary agent can hand a focused task to. Each delegation becomes a Subagent Run that shares the Run's Workspace. Both definitions live in your repository, so you review and version them like any other file. See Guide the Agent From Your Repo for how these files relate to CLAUDE.md and AGENTS.md.

The Project Agent File ​

The Project Agent is .zozo/agent.md. A file without frontmatter keeps its original meaning: the whole file is appended to the task prompt as project guidance. With no file at all, the default Project Agent applies and a Run behaves as it always has, bounded by the default Subagent Ceiling.

When the file starts with a YAML frontmatter block, these fields are available. Unknown fields are errors.

FieldTypeMeaning
namestringOptional display name for the Project Agent.
policymapThe Permission Policy for the Project's Runs, for example tier: read-only.
modelmapModel per Provider, for example claude: sonnet.
effortmapEffort per Provider, keyed the same way as model.
stopmapDefault stop limits: maxTurns, maxTokens, maxCost, timeoutMs. Each is a positive number and replaces the matching Project setting.
subagentCeilingmapRequested ceiling: concurrency and depth, both positive integers.
builtInsbooleanSet to false to turn off the vendor's built-in Subagent roles. They stay available by default.

The body after the frontmatter stays appended project guidance. It never replaces the Runtime's own system prompt.

markdown
---
policy:
  tier: workspace-write
model:
  claude: opus
subagentCeiling:
  concurrency: 2
  depth: 1
builtIns: true
---
Run the schema check after touching migrations/.

Subagent Files ​

Each Subagent is one Markdown file at .zozo/agents/<name>.md. The name in the frontmatter is authoritative, not the filename.

FieldRequiredMeaning
nameyesLetters, digits, - and _, starting with a letter or digit. Must be unique across files.
descriptionyesWhen the primary agent should delegate to this Subagent.
modelnoMap from Provider to model. Omit a Provider to inherit the primary agent's model.
effortnoMap from Provider to effort, with the same inheritance.
maxTurnsnoPositive integer cap on the Subagent's turns.
backgroundnotrue runs the Subagent in the background so independent work proceeds in parallel. The default is foreground.
toolsnoA map with an allow list and a deny list of tool names.
overridesBuiltInnoSet to true to deliberately reuse a built-in role name.

The file body is the Subagent's instructions and can't be empty. The names zozo, primary, and default are reserved, and the built-in names general-purpose, Explore, Plan, and statusline-setup need overridesBuiltIn: true.

markdown
---
name: reviewer
description: Reviews a diff for correctness. Use before finishing a change.
model:
  claude: sonnet
maxTurns: 12
tools:
  deny: [Edit, Write]
---
Read the changed files and report defects. Never modify the Workspace.

What Each Provider Honors ​

Zozo translates one definition into each Runtime's native form, so you maintain a single format.

CapabilityClaudeCodexOpenCode
SubagentsYesYesNo
Per-Subagent tool listsYesNoNo
Per-Subagent model and effortYesYesNo
Inner transcript of a Subagent RunYesNoNo

On Claude, tool lists are enforced by the Runtime and again by Zozo's own permission hook, and a denial appears under the Subagent Run that attempted it. On Codex, Subagents are delivered for the single Run and never shared with other Projects.

A field a Provider can't enforce refuses the Run

If a definition sets tools and the Thread's Provider is Codex, or defines any Subagent on a Provider with no Subagent support, Zozo refuses to create the Run instead of dropping the restriction. A Subagent that sets model or effort for a different Provider than the Thread's doesn't trigger a refusal.

When a dispatched Issue hits this refusal, the Dispatcher continues through your configured Credential fallback, so a mixed-Provider Project keeps working when another Credential can honor the definition. Without one, the refusal names the field and the missing capability.

A missing inner transcript never refuses a Run. The Subagent Run is labelled as having no transcript, and the Run's usage total is marked as a lower bound because the Provider can't expose the child's usage.

The Subagent Ceiling ​

The Subagent Ceiling bounds how many Subagent Runs execute at once (concurrency) and how deeply they nest (depth). Zozo's default is four concurrent at depth one. Request different values with subagentCeiling in .zozo/agent.md.

Your request is clamped, never refused. Zozo applies the lower of your request and the Tenant maximum, and the Tenant maximum is itself clamped by your plan in the same way the fleet concurrency cap is. The effective values and any clamp, with the source (Tenant or plan) and the value you requested, are recorded when the Run starts. Cost and token Stop Conditions include Subagent Run spend.

Validate With zozo agents check ​

sh
zozo agents check [<dir>]

The command validates the Project Agent and every Subagent under <dir> (default: the current directory) without creating a Run, and prints the same errors the Dispatcher would. Use it in CI.

Exit codeMeaning
0All definitions are valid, or none exist and the default Project Agent applies.
1One or more errors. Each is printed as file: field: message [code].

zozo run inside a repository picks up the same definitions.

What the Dashboard Shows ​

  • Run transcript. A Subagent Run is a collapsible block nested under the tool call that spawned it, showing its name, status, outcome, and usage. It expands to the inner transcript when the Provider exposes one, and says "The inner transcript is not exposed by this Provider." when it doesn't. Denied tool calls appear inside the block of the Subagent Run that attempted them. Subagent text isn't streamed live.
  • Run header. The effective Subagent Ceiling appears among the Run stats. When a clamp applied, a "Clamped by Tenant" or "Clamped by plan" badge shows the value you requested. Usage detail attributes spend per Subagent Run.
  • Project page. The Project Agent, Subagents, and effective ceiling resolved for the latest Run, plus a warning when native agent files are present.

When a Thread is resumed, its Digest carries each Subagent Run as one line with the delegated task and its final message instead of the inner transcript.

Native Agent Files Are Ignored ​

The Runtime's own .claude/agents and .codex/agents files aren't loaded in a Run. Move that guidance into Subagent files. The Dashboard warns on the Project while those directories exist. See Native Agent Files Are No Longer Loaded.

Malformed Definitions ​

A malformed file starts no Run. The Dispatcher comments on the Issue with each error, moves it to needs-info, and the refusal doesn't count as a failed attempt. Fix the file and relabel the Issueready-for-agent.

Docs for Zozo: a coding-agent harness.