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

/agents UI doesn't reflect agentSettings model overrides

Open darko-mijic opened this issue 1 month ago • 5 comments

Description

The /agents command displays the original model: field from plugin agent definitions instead of the resolved model after applying agentSettings overrides in settings.json.

Steps to Reproduce

  1. Install plugin agents (e.g., from claude-code-workflows marketplace)
  2. Add agentSettings to ~/.claude/settings.json:
    "agentSettings": {
      "debugging-toolkit:debugger": "inherit",
      "unit-testing:test-automator": "inherit",
      "documentation-generation:docs-architect": "inherit"
    }
    
  3. Run /agents command

Expected Behavior

The /agents UI should show inherit (or the resolved parent model) for agents with agentSettings overrides.

Actual Behavior

The /agents UI shows the plugin's default (e.g., sonnet) instead of the user's configured inherit.

Evidence That Settings ARE Working at Runtime

Despite the UI showing sonnet for agents like documentation-generation:docs-architect and unit-testing:test-automator:

  • Token usage stats from ~/.claude/stats-cache.json show ONLY claude-opus-4-5-20251101 tokens
  • Zero Sonnet or Haiku tokens recorded in dailyModelTokens
  • This proves agentSettings with "inherit" is being applied at runtime, inheriting Opus from the main thread
// From stats-cache.json - no sonnet tokens despite using "sonnet"-marked agents
"dailyModelTokens": [
  {"date": "2025-12-24", "tokensByModel": {"claude-opus-4-5-20251101": 1021608}}
]

Impact

  • UX Confusion: Users can't verify their settings are working through the UI
  • Debugging difficulty: When troubleshooting agent performance, the UI shows misleading model information
  • Related issue: Arrow key navigation in /agents doesn't work on macOS (can't scroll to select agents)

Environment

  • macOS Darwin 25.1.0
  • Claude Code version: 2.0.76
  • Plugins: Multiple from claude-code-workflows marketplace

Additional Context

The agentSettings object in ~/.claude/settings.json contains 73 agent overrides set to "inherit". All of them appear to work correctly at runtime (based on token usage), but none are reflected in the /agents UI display.

darko-mijic avatar Dec 25 '25 00:12 darko-mijic


Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/13953
  2. https://github.com/anthropics/claude-code/issues/10012
  3. https://github.com/anthropics/claude-code/issues/8932

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 Dec 25 '25 00:12 github-actions[bot]

Update: More Serious Bug Found

Upon further investigation, found a more critical issue:

Evidence

When agents have agentSettings set to "inherit", Claude Code passes the literal string "inherit" to the API:

{
  "type": "error",
  "error": {
    "type": "not_found_error", 
    "message": "model: inherit"
  },
  "request_id": "req_011CWSWEuEEYRodbdXrWdsP2"
}

This caused all three agent calls (agent-a6b59a0, agent-a7a39ad, agent-ad630bd) to fail with 404 errors.

Root Cause

When agentSettings contains "inherit" as the model value, Claude Code should:

  1. Resolve "inherit" to the parent thread's model (e.g., claude-opus-4-5-20251101)
  2. Pass the resolved model name to the API

Instead, it's passing the literal string "inherit" to Anthropic's API, which doesn't recognize it as a valid model.

Session Details

  • Session ID: 2693cef6-b701-46ee-addb-f087163a284d
  • Agent type: documentation-generation:docs-architect (marked as sonnet in plugin, overridden to inherit in settings)
  • All three parallel agent calls failed with the same 404 error

This is more severe than a display bug - agents configured with "inherit" cannot start at all.

darko-mijic avatar Dec 25 '25 01:12 darko-mijic

This is a huge problem. Model output execution is critical especially for long term agentic builds.

On Wed, Dec 24, 2025 at 19:11 Darko Mijić @.***> wrote:

darko-mijic left a comment (anthropics/claude-code#15319) https://github.com/anthropics/claude-code/issues/15319#issuecomment-3690681095 Update: More Serious Bug Found

Upon further investigation, found a more critical issue: Evidence

When agents have agentSettings set to "inherit", Claude Code passes the literal string "inherit" to the API:

{ "type": "error", "error": { "type": "not_found_error", "message": "model: inherit" }, "request_id": "req_011CWSWEuEEYRodbdXrWdsP2" }

This caused all three agent calls (agent-a6b59a0, agent-a7a39ad, agent-ad630bd) to fail with 404 errors. Root Cause

When agentSettings contains "inherit" as the model value, Claude Code should:

  1. Resolve "inherit" to the parent thread's model (e.g., claude-opus-4-5-20251101)
  2. Pass the resolved model name to the API

Instead, it's passing the literal string "inherit" to Anthropic's API, which doesn't recognize it as a valid model. Session Details

  • Session ID: 2693cef6-b701-46ee-addb-f087163a284d
  • Agent type: documentation-generation:docs-architect (marked as sonnet in plugin, overridden to inherit in settings)
  • All three parallel agent calls failed with the same 404 error

This is more severe than a display bug - agents configured with "inherit" cannot start at all.

— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/15319#issuecomment-3690681095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY7DCNCB7XNS43GF6GBCGD34DM2VDAVCNFSM6AAAAACP67GHOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOJQGY4DCMBZGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

siddhzx avatar Dec 25 '25 01:12 siddhzx

@claude please investigate the exact file that manages output transmuxion in the claude code main thread.

@copilot please review

siddhzx avatar Dec 25 '25 01:12 siddhzx

Resolution Found: Short Model Aliases Not Resolved for Subagents

Confirmed Bug

Short model aliases (opus, inherit, sonnet, haiku) are not being resolved to full model IDs when passed to subagents via the Task tool.

Test Results

Configuration Value Result
agentSettings with "inherit" inherit ❌ 404 "model: inherit"
agentSettings with "opus" opus ❌ 404 "model: opus"
CLAUDE_CODE_SUBAGENT_MODEL="opus" opus ❌ 404 "model: opus"
CLAUDE_CODE_SUBAGENT_MODEL="claude-opus-4-5-20251101" Full ID ✅ Works!

Workaround

Use the full model identifier instead of short aliases:

export CLAUDE_CODE_SUBAGENT_MODEL="claude-opus-4-5-20251101"

Confirmed Working Session

After using the full model ID, the agent successfully ran and confirmed:

"I can confirm I am running on Claude Opus 4.5 (model ID: claude-opus-4-5-20251101)"

Summary

  1. agentSettings in settings.json: Does not work with short aliases
  2. CLAUDE_CODE_SUBAGENT_MODEL env var: Does not work with short aliases
  3. Full model ID: Works correctly
  4. /agents UI: Shows plugin defaults, not user overrides (separate display bug)

The short alias resolution that works for the main thread (--model opus) is not being applied to subagent model configuration.

darko-mijic avatar Dec 25 '25 01:12 darko-mijic