[BUG] output_style.name in status line JSON always returns "default" after /output-style change

Resolved 💬 3 comments Opened Feb 20, 2026 by kecan0406 Closed Feb 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

After changing the output style via /output-style (e.g., to "Explanatory"), the output_style.name field in the status line JSON always returns "default".

The setting is saved to settings.local.json correctly and takes effect in the system prompt, but the status line data never reflects the change.

Status line JSON dump after changing to "Explanatory":

{
  "output_style": {
    "name": "default"
  }
}

What Should Happen?

output_style.name in the status line JSON should return the currently active output style name (e.g., "Explanatory").

Steps to Reproduce

  1. Configure a status line script that outputs output_style.name:

``javascript
// ~/.claude/statusline.js
const chunks = [];
process.stdin.on("data", (chunk) => chunks.push(chunk));
process.stdin.on("end", () => {
const data = JSON.parse(Buffer.concat(chunks).toString());
const fs = require("fs");
fs.writeFileSync("statusline-debug.json", JSON.stringify(data, null, 2));
process.stdout.write(data.output_style?.name || "unknown");
});
``

  1. Start a Claude Code session
  2. Run /output-style and select "Explanatory"
  3. Observe the status line still shows "default"
  4. Check statusline-debug.json to confirm output_style.name is "default"

Root Cause

The status line function reads outputStyle from the zustand store's settings object. When /output-style saves via the settings writer function, it calls markInternalWrite before writing the file, which causes the file watcher to suppress the change notification (within a 5-second window). Since the watcher is suppressed, the subscriber that syncs file changes back to the zustand store is never called, leaving settings.outputStyle as undefined and falling back to "default".

The setting does persist to settings.local.json and the system prompt correctly picks it up on the next API call, so the output style itself works -- only the status line data is stale.

Is this a regression?

I don't know

Claude Code Version

2.1.49

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

View original on GitHub ↗

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