Skip to content

feat(statusline): show reasoning effort level alongside model name - #31

Draft
yulonglin wants to merge 1 commit into
mainfrom
worktree-statusline-reasoning-effort
Draft

feat(statusline): show reasoning effort level alongside model name#31
yulonglin wants to merge 1 commit into
mainfrom
worktree-statusline-reasoning-effort

Conversation

@yulonglin

Copy link
Copy Markdown
Owner

Summary

  • Statusline now appends the current reasoning-effort level to the model name bracket, e.g. [Sonnet 5 · high], for models that support configurable effort (falls back to plain [Model Name] otherwise).
  • Implemented in both dual-implementation statuslines: claude/statusline.sh (bash fallback) and tools/claude-tools/src/statusline.rs (Rust primary).
  • The effort.level field was reverse-engineered from the installed Claude Code CLI binary (2.1.216) — it's a top-level effort: {level: "low"|"medium"|"high"|"xhigh"} sibling to model/cost/context_window in the statusline stdin JSON, sent only for models that support configurable effort.
  • Rebuilt claude-tools for linux-x86_64 and regenerated tools/claude-tools/SHA256SUMS to match.

Test plan

  • Verified Rust binary end-to-end against sample stdin JSON, both with and without effort present
  • Verified full claude/statusline.sh end-to-end against sample stdin JSON, both with and without effort present — output matches Rust implementation exactly ([Sonnet 5 · high] / [Haiku 4.5])
  • Confirmed custom_bins/claude-tools-linux-x86_64 checksum matches the newly built binary

https://claude.ai/code/session_019m9jsBpvKn79DC1vGnWeF6

Claude Code sends an effort.level field (low/medium/high/xhigh) in the
statusline stdin JSON for models that support configurable reasoning
effort. Append it to the model name bracket in both implementations:
[Sonnet 5 · high] instead of just [Sonnet 5]. Falls back to the plain
model name when effort is absent (older models, or models without
configurable effort).

- claude/statusline.sh: bash fallback
- tools/claude-tools/src/statusline.rs: Rust primary, rebuilt for
  linux-x86_64 with checksums regenerated

Claude-Session: https://claude.ai/code/session_019m9jsBpvKn79DC1vGnWeF6
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