Bug
src/default-agents.ts:40 pins model: "anthropic/claude-haiku-4-5" on the default Explore agent. Model resolution in src/agent-runner.ts:720 is:
const model = options.model ?? resolveDefaultModel(
ctx.model, ctx.modelRegistry, agentConfig?.model,
);
agentConfig.model always wins over the parent session model. The README describes this as "haiku (falls back to inherit)", but the fallback in resolveDefaultModel only triggers when the model is absent from the registry — not when it is present but quota-exhausted.
Impact
On a session running a non-Anthropic model (e.g. minimax/MiniMax-M3), every Explore spawn silently goes to claude-haiku-4-5 — a different provider with a separate quota pool. When that pool is a capped key (OpenRouter free tier), a few concurrent Explore spawns exhaust it:
▸ Explore Audit SPEC §9 audio
✗ anthropic: claude haiku 4.5 · ↻1
⎿ Error: 403: {"message":"Key limit exceeded (total limit)..."}
All subagents fail while the parent session is completely unaffected — and the parent LLM has no idea why, since nothing surfaces "your subagents are on a different provider" anywhere.
Suggested fixes (in increasing order of preference)
-
Document the override path more prominently. The native fix exists (user .md with the same name, no model: → inherits parent), but discovery requires reading agent-runner.ts. (For reference, this is what we now do downstream.)
-
Add a first-class per-agent model setting to subagents.json (e.g. modelOverrides: { "Explore": "provider/id" } and/or modelStrategy: "inherit-parent") so wrappers and users do not have to manage .md files that duplicate the default system prompt (staleness liability).
-
Best: retry-spawn-with-parent-model on quota errors. When a subagent spawn/turn fails with 403 Key limit exceeded / 429, transparently retry the spawn with the parent session model instead of failing the agent run. Quota exhaustion is exactly the case where "cheap search model" should degrade to "whatever the session is using" — the work matters more than the model tier.
Environment
- pi-subagents 0.14.3
- pi-coding-agent (latest), session model
minimax/MiniMax-M3, claude-haiku-4-5 resolved via OpenRouter
Downstream context: we worked around this in pi-goal-list-loop-audit@0.24.6 by managing ~/.pi/agent/agents/Explore.md without the model pin (with a drift test against your default-agents.ts). Happy to upstream any part of that if useful.
Bug
src/default-agents.ts:40pinsmodel: "anthropic/claude-haiku-4-5"on the default Explore agent. Model resolution insrc/agent-runner.ts:720is:agentConfig.modelalways wins over the parent session model. The README describes this as "haiku (falls back to inherit)", but the fallback inresolveDefaultModelonly triggers when the model is absent from the registry — not when it is present but quota-exhausted.Impact
On a session running a non-Anthropic model (e.g.
minimax/MiniMax-M3), everyExplorespawn silently goes to claude-haiku-4-5 — a different provider with a separate quota pool. When that pool is a capped key (OpenRouter free tier), a few concurrent Explore spawns exhaust it:All subagents fail while the parent session is completely unaffected — and the parent LLM has no idea why, since nothing surfaces "your subagents are on a different provider" anywhere.
Suggested fixes (in increasing order of preference)
Document the override path more prominently. The native fix exists (user
.mdwith the same name, nomodel:→ inherits parent), but discovery requires readingagent-runner.ts. (For reference, this is what we now do downstream.)Add a first-class per-agent model setting to
subagents.json(e.g.modelOverrides: { "Explore": "provider/id" }and/ormodelStrategy: "inherit-parent") so wrappers and users do not have to manage.mdfiles that duplicate the default system prompt (staleness liability).Best: retry-spawn-with-parent-model on quota errors. When a subagent spawn/turn fails with 403
Key limit exceeded/ 429, transparently retry the spawn with the parent session model instead of failing the agent run. Quota exhaustion is exactly the case where "cheap search model" should degrade to "whatever the session is using" — the work matters more than the model tier.Environment
minimax/MiniMax-M3, claude-haiku-4-5 resolved via OpenRouterDownstream context: we worked around this in
pi-goal-list-loop-audit@0.24.6by managing~/.pi/agent/agents/Explore.mdwithout the model pin (with a drift test against yourdefault-agents.ts). Happy to upstream any part of that if useful.