Skip to content

subagents: per-persona and per-spawn model pin (tier in agent frontmatter) #292

Description

@justrach

Problem

Worker model selection is session-wide (--subagent-model). Every child in a fan-out runs on the same model, so you cannot run reviewers on a frontier model and implementers on a mid one within a single workflow - which is exactly the shape that makes a fan-out economical.

Codex does this via roles: a spawned agent takes a role, and apply_role_to_config overlays role-specific config that may override the model.

Proposal

1. Persona frontmatter. AgentType (src/fleet.zig:35) already carries isolation: ?Isolation as a persona default parsed from .harness/agents/* frontmatter. Add the same shape:

---
name: implementer
tier: mid          # or: model: gpt-5.6-terra
isolation: worktree
---

tier resolves through the ladder; model pins an exact name. tier is preferred - it stays correct when the root model changes.

2. Per-spawn override. Optional model / tier on the subagent tool schema and on each workflow phase task / pipeline stage (src/schema.zig).

Precedence: per-spawn override > persona frontmatter > --subagent-model > default ladder > root model.

3. Provider locality. A resolved pin landing on another provider requires the existing --allow-cross-provider-subagents consent. Reuse subagentProvider() in src/subagent_selection.zig unchanged.

Blocked on

The fleet archive-integrity issue must land first. Once children in one tournament can differ in model, scoreVariants attributes the judge's score entirely to the prompt fingerprint, silently writing model effects into the prompt archive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions