[Bug]: Agents panel mislabels model for depth-2 (nested) agent spawns — shows session default instead of actual serving model
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Run a session whose main-loop model is
claude-fable-5[1m], served through a local proxy (ANTHROPIC_BASE_URL=http://localhost:8317). - Define custom agents in
~/.claude/agents/with frontmatter model pins to OpenAI models served through the same proxy:Explore→model: gpt-5.6-sol-fast(medium),codex-sol→model: gpt-5.6-sol(high). - Have the main loop spawn
codex-sol(depth 1). - Have that agent call the Agent tool itself to spawn several
Exploreagents (depth 2). - Open the Agents panel and compare the model column against the per-response
modelfield in the agent records.
Expected behavior
Model column reflects the resolved frontmatter model (or the per-response model field) at any spawn depth — gpt-5.6-sol for all five agents.
Actual behavior
- Depth-1 spawns: correct —
gpt-5.6-sol · high. - Depth-2 spawns: labeled
fable-5 · high(the session default), even though every response in those agents was served bygpt-5.6-sol— verifiable from the per-responsemodelfield and the OpenAIresp_…response-id format (genuine Fable responses carryclaude-fable-5with Anthropicmsg_…ids, so the two are unambiguous). - Depth-2 spawn metadata does record the correct
agentType: "Explore",parentAgentId, andspawnDepth: 2; only the model label falls back to the inherited session model at that hop.
Impact
Major degradation or frequent failure — users auditing model usage see false positives (the panel attributed ~1.6M tokens to fable-5 that were actually served by gpt-5.6-sol). If the same spawn-record label feeds usage/quota attribution, nested-agent traffic may be counted against the wrong provider/model bucket (here: Anthropic instead of OpenAI). Please confirm whether attribution uses the panel label or the per-response model field.
Environment
macOS 26 (Darwin 25.5.0), t3code desktop app, local CLIProxyAPI/VibeProxy on port 8317
Opened https://github.com/pingdotgg/t3code/pull/7199 for this.
Nested task_started was copying the parent session model whenever the Agent-tool spawn omitted one, so the Agents panel labeled depth-2 children as the session default (fable-5) even when every response was served by the child’s frontmatter model.
The adapter now persists only an explicit spawn/SDK model and refines from the first assistant / message_start serving model. A nested spawn without a model stays unlabeled until that later payload arrives.
Thanks for the detailed report. We believe this is fixed by PR #7583.
The landed model-refinement change preserves a child assistant response model even when that response arrives before task_started. It later applies that model instead of the parent session fallback. Responses that arrive after registration still refine the task. This directly addresses persistent wrong child labels when launch input is missing, including nested children whose response model is present in the report.
I'm closing this as fixed as part of an automated pass on all open issues. If this still happens in a current build that includes PR #7583, please reply with the T3 Code version and fresh logs or reproduction details, and we can reopen it.