anthropics / anthropics/claude-code

Background-agent view shows the parent's advisor model (Fable) instead of the subagent's requested model

Open
#94,575 1 comment 0 reactions 0 assignees View on GitHub
area:agent-view bug has repro platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

## Summary

When a Fable 5.1 session spawns a subagent with the Agent tool's `model` override (for example `model: "sonnet"`), the background-agent view labels the task as running on Fable. The subagent actually runs on the requested model; the transcript proves it. The label appears to come from the `advisor_tool` attachment the subagent carries, whose `model` is the parent's advisor model (Fable), not from the subagent's own turns.

## Environment

- Claude Code 2.1.270, macOS (Darwin 25.6.0)
- Parent session model: claude-fable-5-1
- Subagents spawned via the Agent tool with `subagent_type: "general-purpose"` and `model: "sonnet"` / `"opus"` / `"haiku"`

## Steps to reproduce

1. In a Fable 5.1 session, spawn a background subagent with the Agent tool and `model: "sonnet"`.
2. Open the background-agent / task view for that subagent. It shows Fable.
3. Count the `model` fields in the subagent's transcript under `~/.claude/projects///subagents/agent-.jsonl`:

```
grep -o '"model":"[^"]*"' agent-.jsonl | sort | uniq -c
```

## Observed

Four subagents from one session, counts of `"model"` values in each transcript:

| requested `model` | `"message":{"model":...}` (the subagent's own turns) | `"attachment":{"type":"advisor_tool","model":...}` |
|---|---|---|
| sonnet | claude-sonnet-5 x83 | claude-fable-5-1 x1 |
| opus | claude-opus-5 x86 | claude-fable-5-1 x3 |
| haiku | claude-haiku-4-5-20251001 x33 | claude-fable-5-1 x1 |
| sonnet | claude-sonnet-5 x27 | claude-fable-5-1 x1 |

Example lines from the first agent's transcript (trimmed):

```
{"message":{"model":"claude-sonnet-5","id":"msg_011Cf5fM6o8UNa7FPeDXc7AN","role":"assistant",...}}
{"attachment":{"type":"advisor_tool","available":true,"model":"claude-fable-5-1"},"type":"attachment",...}
```

The only Fable entries are the advisor attachments. Every assistant turn is on the requested model.

## Expected

The background-agent view shows the model the subagent runs on (Sonnet 5 here), or shows both the agent model and the advisor model with distinct labels. Users routing work by tier read that view to confirm routing, and it currently reports the wrong thing.

## Impact

The user concluded the `model` override was being ignored ("the model launched was not SONNET") and had to be shown the transcript counts to confirm it was honoured.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue using the background-agent/task view, then inspect the subagent transcript at ~/.claude/projects///subagents/agent-.jsonl and compare message model fields with advisor_tool attachment fields using the provided grep command. Trace which model field the view displays and make the labels distinguish the subagent model from the advisor model, then verify Sonnet, Opus, and Haiku overrides in the task view.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.