Skip to content

[Bug]: Agents panel mislabels model for depth-2 (nested) agent spawns — shows session default instead of actual serving model #6026

Description

@bayoumymac

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Run a session whose main-loop model is claude-fable-5[1m], served through a local proxy (ANTHROPIC_BASE_URL=http://localhost:8317).
  2. Define custom agents in ~/.claude/agents/ with frontmatter model pins to OpenAI models served through the same proxy: Exploremodel: gpt-5.6-sol-fast(medium), codex-solmodel: gpt-5.6-sol(high).
  3. Have the main loop spawn codex-sol (depth 1).
  4. Have that agent call the Agent tool itself to spawn several Explore agents (depth 2).
  5. Open the Agents panel and compare the model column against the per-response model field 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 by gpt-5.6-sol — verifiable from the per-response model field and the OpenAI resp_… response-id format (genuine Fable responses carry claude-fable-5 with Anthropic msg_… ids, so the two are unambiguous).
  • Depth-2 spawn metadata does record the correct agentType: "Explore", parentAgentId, and spawnDepth: 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions