Status line: no way to distinguish ultracode from xhigh (no `ultracode` field in stdin JSON)
What I'm trying to do
Surface the active ultracode mode in a custom status line.
Problem
The status line stdin JSON exposes reasoning effort via effort.level, but ultracode is deliberately collapsed into xhigh and there is no separate signal. From the docs (https://code.claude.com/docs/en/statusline):
effort.level— Current reasoning effort (low,medium,high,xhigh, ormax). [...] Ultracode is not a distinct level and reports asxhigh.
The full status line JSON schema contains no ultracode field (neither top-level nor nested), and per https://code.claude.com/docs/en/model-config ultracode is a session-only setting that is not written to settings.json. Consequently a status line script has no data source from which it could tell whether the current session is in plain xhigh or in ultracode — they are indistinguishable.
Request
Expose an explicit ultracode indicator in the status line stdin JSON, e.g. a top-level boolean "ultracode": true or a nested effort.ultracode: true, so custom status lines can render it (the same way effort.level is already surfaced).
Why it matters
ultracode changes orchestration behaviour (dynamic multi-agent workflows) and token usage substantially, so being able to see at a glance that a session is in ultracode — not just xhigh — is useful for cost/behaviour awareness.
Environment
- Claude Code version: 2.1.169 (Claude Code)
- Platform: macOS (darwin)
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Worth linking this to where the confusion starts. On the input side, the
/effortpicker presentsultracodeas the top option next to the real tiers ("low, medium, high, xhigh, max, ultracode, auto"), so users believe it is a higher effort thanmax— then the status line can't reflect it because, exactly as you and #63468 note,ultracodeisn't a distinct level; it isxhigh+ dynamic-workflow orchestration tracked as a separate session flag.Your ask (a first-class
ultracodefield in the stdin JSON) is the right fix on the status-line side. The matching fix on the input side is to stop presentingultracodeas a peer effort tier in the selector — or to annotate it as "xhigh + dynamic workflow orchestration" (the CLI already ships that string), so the two sides agree.Broader labeling/transparency issue: #69653.
+1 — fresh data point confirming this is still the case on v2.1.215 (Linux/Fedora 44), and that there is currently no reliable path to this information at all.
Use case: a custom multi-line status line that displays
effort.levelin a session-status segment. Ultracode materially changes session behavior (workflow orchestration and the token spend that comes with it), so "xhigh" versus "ultracode" is exactly the kind of state a status line exists to surface — but the stdin JSON makes them indistinguishable.What I verified on 2.1.215:
/effort ultracodeconfirms with "Set effort level to ultracode (this session only): xhigh + dynamic workflow orchestration", but the statusline JSON still reportseffort.level: "xhigh"./effort ultracodepath (as opposed to the/modelpicker) emits"ultracode"— I could not reproduce that on Linux/2.1.215. Whatever inconsistency existed there, the field collapses to"xhigh"on this platform and version through both paths."ultracode": truesettings key is likewise not reflected anywhere in the statusline payload.Current workaround, for anyone landing here: have the statusline script read
"ultracode"from~/.claude/settings.jsonwith jq and show a marker when it istrueand the stdineffort.levelis"xhigh". That approximates the configured default but cannot track live state — mid-session/effortchanges in either direction are invisible.Suggested shape: a boolean sibling (
effort.ultracode: true) rather than a neweffort.levelvalue, since ultracode is documented as a Claude Code setting layered on top ofxhighrather than a distinct model effort level — that would keepeffort.levela clean enum for existing scripts while making the toggle observable.Adding two things that strengthen this: how cheap the fix looks, and a working (if fragile) workaround.
The state already exists internally, it is just dropped before the statusline metadata. On 2.1.216, selecting ultracode issues
apply_flag_settings { effortLevel: "xhigh", ultracode: true }; theultracodeboolean lives in session AppState andget_settingsalready returns anapplied.ultracode. The statusline/hook metadata is built bynotifyMetadataChanged({ effort_level }), which emits onlyeffort_leveland omits the boolean. Soeffort.ultracode(or a top-levelultracode), plus$CLAUDE_ULTRACODEfor hook parity with$CLAUDE_EFFORT, is an additive change to that one payload.Version note (2.1.216): the
/effort → effort.level:"ultracode"behavior reported in #77812 (2.1.210) is gone here; both the/effortand model-picker paths now reporteffort.level:"xhigh", so there is currently no field-based signal at all.Workaround that works today (fragile). Ultracode injects a per-turn `
<system-reminder>whose transitions are persisted into the transcript asattachmentrecordsultra_effort_enter/ultra_effort_exit. A statusline handedtranscript_path` can read the last one:Caveats an official field would remove: undocumented internal format, and eventually-consistent (the enter/exit marker is only written when the next user prompt builds its attachments, so changing
/effortwithout sending a message shows the stale state until the next turn). Verified on 2.1.216, macOS.