Skip to content

feat(statusline): add mode · algorithm-tier · model-effort row#1360

Open
brycemagera wants to merge 2 commits into
danielmiessler:mainfrom
brycemagera:feat/statusline-mode-effort-row
Open

feat(statusline): add mode · algorithm-tier · model-effort row#1360
brycemagera wants to merge 2 commits into
danielmiessler:mainfrom
brycemagera:feat/statusline-mode-effort-row

Conversation

@brycemagera

Copy link
Copy Markdown

What

Adds a single status-line row beneath STATE: that surfaces three things at a glance:

Segment Shows Source
NATIVE / ALGORITHM current PAI mode (active highlighted) MEMORY/STATE/work.jsoncurrentMode, matched by sessionUUID
1 2 3 4 5 active Algorithm tier E1–E5 (all dim outside algorithm mode) work.jsoneffort (standard→1 … comprehensive→5)
🔒 LEVEL: LOW MEDIUM HIGH MAX model reasoning effort Claude Code's native statusline JSON .effort.level

Rendered (algorithm tier 3, high effort):

⊞ NATIVE ALGORITHM 1 2 3 4 5  │  🔒 LEVEL: LOW MEDIUM HIGH MAX

Active items are color-highlighted; effort is graded green→yellow→orange→rose.

Why

Mode, tier, and reasoning effort are otherwise invisible mid-session. Surfacing them keeps you oriented on which PAI mode is running, how deep the Algorithm tier is, and what effort the model is set to — without a command.

Notes

  • No new plumbing for model effort — Claude Code already emits effort.level, fast_mode, and thinking in the statusline input JSON (CC ≥ 2.1.x). This PR also parses fast_mode/thinking but leaves them unrendered as easy hooks for future indicators.
  • Renders in normal width only, consistent with neighboring lines.
  • Degrades gracefully: defaults to native/standard when no session matches; absent .effort.level → all effort labels dim. No existing line is altered.
  • bash -n clean; renders with no stderr across native/algorithm × tier × effort cases.

Scope

Single file: Releases/v5.0.0/.claude/PAI/statusline-command.sh (+83 / −1).

Adds one row under STATE showing, at a glance:
- PAI mode: NATIVE vs ALGORITHM (active highlighted)
- Active Algorithm tier E1-E5 (dim when not in algorithm mode)
- Model reasoning effort: LOW/MEDIUM/HIGH/MAX

Mode + tier are read from MEMORY/STATE/work.json matched by sessionUUID;
model effort comes from Claude Code's native statusline JSON .effort.level
(no new state/plumbing). Renders in normal width only, degrades gracefully
(defaults native/standard; absent effort -> all dim). No other lines touched.
Anthropic models support low/medium/high/xhigh/max reasoning effort,
but the LEVEL row only rendered low/medium/high/max. Add XHIGH (red,
between HIGH orange and MAX rose) so the active label resolves
correctly when effort.level is xhigh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant