[BUG] output_style.name in statusline JSON does not update when changed via /output-style
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
- 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\""
}
}
- Start a Claude Code session
- Verify
output_style.namein/tmp/claude_statusline_debug.jsonmatches current style - Run
/output-styleand change to a different style (e.g., from "Explanatory" to "Learning") - Wait for the statusline to refresh (file modification timestamp updates)
- Check
/tmp/claude_statusline_debug.json—output_style.namestill 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
modelobject updates immediately by comparison, suggestingoutput_styleis 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
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗