claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[MODEL] Orchestrator keeps resuming a failing Sonnet-pinned subagent instead of escalating model or effort

Open brunosantoscodexforgeceo opened this issue 4 days ago • 1 comments

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information

Type of Behavior Issue

Subagent behaved unexpectedly (and the orchestrating session never reacted to it)

Summary

The orchestrating session kept sending work back to a subagent that was visibly failing at it, round after round, without ever (a) checking which model that subagent type runs on, (b) escalating the model, (c) raising the effort, or (d) taking the task over or handing it to a stronger agent. The subagent type was pinned to Sonnet by its definition; the session itself was running the top-tier model. The orchestrator only looked at the subagent's model when the user asked "which model and effort are you using for these agents?", several hours and five follow-up pull requests later.

What I Asked Claude to Do

A long, multi-repository task in the desktop app (Code tab): re-analyse a feature spec, plan it, implement it across a backend API and three clients with one agent per repository, then run a validation campaign and fix what it finds. The session delegated the backend implementation and every backend follow-up fix to an agent spawned with subagent_type: "golang-pro", a user-level agent definition in ~/.claude/agents/ whose frontmatter says model: sonnet. No model or effort override was passed to the Agent tool, and later rounds reused the same agent through SendMessage.

What Claude Actually Did

  1. Spawned the backend agent with a specialised agent type and no model override. The session did not read the type's definition and did not know it was pinned to Sonnet.
  2. The backend work needed four corrections from an independent review before its first PR, then follow-up PRs as validation found defects. One defect (a forecast calculation that used a "neutral for spending" flag to decide a cash-balance question) was "fixed" three times in a row by that same agent: the first fix covered one consumer of the rule and introduced a double count; the second patched two more consumers with an overlay; a controlled experiment later showed the second fix still left the main view and a dashboard series wrong.
  3. After each failed round the orchestrator wrote a more detailed brief and resumed the SAME agent with SendMessage. It never asked why the agent kept producing partial fixes, and never considered that the model was not strong enough for the task.
  4. The user said in plain words that this looked like "patch on top of patch instead of a complete solution". The orchestrator acknowledged it, and still sent the next round to the same Sonnet agent.
  5. Only when the user asked which model and effort the agents were using did the orchestrator grep the agent definitions and discover model: sonnet on five of the agent types it had been using for implementation work (the campaign agents, spawned as general-purpose, had inherited the session's model, and those were the ones finding the defects).
  6. The same agent then left four failing cases labelled "a separate issue" in its final report, mid-way through an unrequested schema migration, before it was finally stopped and the work handed to an agent on the session's model.

Expected Behavior

  • An orchestrator should treat repeated failure of a delegated task as information about the delegate, not only about the brief. After a second failed round on the same problem it should escalate: stronger model, higher effort, or take the task over, and say so.
  • Before delegating non-trivial work, the orchestrator should know what model the agent type runs on. A specialised type that silently downgrades the model should not be chosen for the hardest part of a task without an explicit decision.
  • When the user points out that the delegated work is a chain of patches, the orchestrator should change something about HOW the work is done (model, effort, agent, or doing it itself), not just write a longer brief for the same agent.

What seems to contribute (from the orchestrator's side)

  • The agent-type listing the orchestrator sees shows each type's description and tools, but not its model (or effort). The spawn result does not echo the model the agent actually runs on either. Nothing in the loop surfaces "this agent is on a smaller model than you".
  • The Agent tool's effort parameter is documented to the model as: set this ONLY when the user or instructions explicitly ask for a specific effort level, never on your own judgment. That is a sensible default against waste, but it also removes effort escalation as a response to repeated failure, which is exactly when the orchestrator's own judgment should count.
  • SendMessage resumes an agent on its original model. There is no way to keep an agent's accumulated context and continue on a stronger model, so "keep the context" and "escalate the model" pull in opposite directions, and the orchestrator kept choosing context.
  • Nothing in the orchestration guidance tells the model to progress model/effort on repeated subagent failure.

Suggestions

  1. Show model (and effort) per agent type in the listing given to the orchestrator, and echo the effective model/effort in every spawn and resume result.
  2. Add orchestration guidance: after N failed or partial rounds on the same delegated problem, escalate model and/or effort, or take over, and tell the user.
  3. Allow a model (and effort) override when continuing an existing agent, or offer a "re-spawn on a stronger model with this agent's context" path.
  4. Relax the effort rule for the specific case of escalation after failure.

Permission Mode

Auto mode (desktop app, Code tab)

Can You Reproduce This?

Haven't tried to reproduce. It was a single long session, but the pattern (resume the same weaker agent after each failure) held for every round over several hours.

Environment

  • Claude Code 2.1.311, desktop app (Code tab), macOS
  • Orchestrating session on the top-tier model; implementation subagents on user-level agent types with model: sonnet in their frontmatter
  • Effort was never set on any Agent call

This report was drafted by Claude at the user's request, describing its own behavior in the session.

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/95823
  2. https://github.com/anthropics/claude-code/issues/102655
  3. https://github.com/anthropics/claude-code/issues/102156

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Nov 30 '26 20:11 github-actions[bot]