[BUG] output_style.name in statusline JSON does not update when changed via /output-style

Resolved 💬 6 comments Opened Feb 3, 2026 by nicholas-lonsinger Closed Apr 11, 2026

Describe the bug

When changing the output style via /output-style, the output_style.name field in the statusline JSON payload does not update to reflect the new value. It remains stale, showing the previous output style indefinitely. Other fields like model.display_name update correctly and immediately when changed via /model.

To reproduce

  1. Configure a statusline command that dumps the raw JSON to a file:

``json
{
"statusLine": {
"type": "command",
"command": "input=$(cat); echo \"$input\" > /tmp/claude_statusline_debug.json; printf \"test\""
}
}
``

  1. Start a Claude Code session
  2. Verify output_style.name in /tmp/claude_statusline_debug.json matches current style
  3. Run /output-style and change to a different style (e.g., from "Explanatory" to "Learning")
  4. Wait for the statusline to refresh (file modification timestamp updates)
  5. Check /tmp/claude_statusline_debug.jsonoutput_style.name still shows the old value

Expected behavior

output_style.name should reflect the currently active output style after changing it via /output-style, consistent with how model.display_name updates immediately after /model.

Observed behavior

| Field | Updates after command? | Command |
|-------|----------------------|---------|
| model.display_name | Yes, immediately | /model |
| output_style.name | No, stays stale | /output-style |

Example debug JSON after switching from "Learning" to "Explanatory":

{
  "model": { "display_name": "Opus 4.5" },
  "output_style": { "name": "Learning" }
}

The model is correct (Opus 4.5), but output_style still shows "Learning" instead of "Explanatory".

Environment

  • Claude Code version: 2.1.29
  • OS: macOS 26.2 (Build 25C56)
  • Shell: zsh

Additional context

  • The value does seem to eventually update after a very long delay (many minutes), but not on the next statusline refresh cycle
  • The model object updates immediately by comparison, suggesting output_style is populated via a different code path that doesn't pick up live changes
  • Changing the output style does take effect immediately for the conversation itself — only the statusline JSON is stale

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗