[FEATURE] Expose current effort level (including "max") in statusLine JSON input

Status Closed — not planned
Maintainer reply None cached
Activity 5 comments · opened Mar 15, 2026 · closed Apr 12, 2026

Problem

The statusLine command receives a JSON blob on stdin with session info (model, context_window, cost, workspace, etc.), but effort level is not included. This makes it impossible for custom statusline scripts to display the current effort level accurately.

The current workaround is reading effortLevel from settings.json, but this has two problems:

  1. "max" effort is session-only and never persisted — the effortLevel schema enum is ["low", "medium", "high"], so max isn't stored anywhere accessible to a shell script
  2. No hook fires for max — ConfigChange only fires when files change, and max doesn't write to any file. UserPromptSubmit doesn't fire for built-in commands like /model

The result: statusline scripts cannot distinguish "max" from whatever effort level was set previously.

What I tried

  • Reading effortLevel from settings.json — works for low/medium/high, but max leaves the previous value unchanged
  • ConfigChange hook — doesn't fire for max (no file change)
  • UserPromptSubmit hook — doesn't fire for /model (built-in command)
  • Checking the statusline JSON blob for effort fields — not present
  • Checking env vars (CLAUDE_CODE_EFFORT_LEVEL) — empty in statusline subprocess environment

Proposed solution (either would work)

Option A (preferred): Add an effort_level field to the JSON blob piped to statusLine commands:

{
  "model": { "id": "claude-opus-4-6[1m]", "display_name": "Opus 4.6 (1M context)" },
  "effort_level": "max",
  ...
}

Option B: Add "max" to the effortLevel enum in settings.json schema and persist it like low/medium/high.

Option C: Populate CLAUDE_CODE_EFFORT_LEVEL env var in the statusline subprocess environment with the current session value.

Use case

Custom statusline that shows distinct symbols per effort level:

/home/user | Opus 4.6 (1M context) ◉ | ctx: 4%

Where: ○ = low, ◐ = medium, ● = high, ◉ = max

Environment

  • Claude Code v2.1.76
  • Docker container (Linux)

View original on GitHub ↗

5 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/34666
  2. https://github.com/anthropics/claude-code/issues/34261
  3. https://github.com/anthropics/claude-code/issues/31987

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

chrisjenx · 7 months ago

Theres also a bug here, while models will not change across open sessions, if you change effort on one session, it will change it for other worktrees or forked sessions.

I.e. changing one session to Opus will leave the other as Sonnet, but change one session to High, all sessions will change to High.

github-actions[bot] · 6 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

chrisjenx · 6 months ago

Still needed chaps

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.