Expose focus-mode (/focus) state in the statusline JSON payload

Status Open
Reported on v2.1.274
Maintainer reply None cached
Activity 1 comment · opened Sep 18, 2026

Feature request

Custom statusLine scripts already receive fast_mode in the stdin JSON, but there's no equivalent field for whether /focus (focus/brief-transcript view) is currently on.

Why

I wanted my statusline's model/effort/speed line to also show focus state. There's no way to do it today:

  • The documented statusline JSON schema (https://code.claude.com/docs/en/statusline) has no focus-related field.
  • The toggle's internal state key (briefTranscript, confirmed by inspecting the CLI binary strings) lives only in the running terminal process's in-memory app state — it is not written to settings.json, settings.local.json, or any other file I could find. I toggled /focus live and diffed/mtime-swept ~/.claude afterward; nothing on disk changed.
  • Since a custom statusLine command runs as a fresh, separate subprocess on each render, it has no way to read that in-memory state.

Suggested fix

Add a focus_mode: boolean (or similarly named) field to the statusline stdin JSON, alongside the existing fast_mode field, reflecting current /focus state.

Workaround

None found. Claude Code's own footer does show a "Focus" badge on its mode-indicator row (added per the changelog, e.g. entries around v2.1.9x), and that footer renders in its own row alongside a custom statusline rather than being replaced by it — so the state is visible to the user, just not to statusline scripts.

Environment

  • Claude Code version: 2.1.274
  • Platform: macOS (Darwin 25.6.0)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗