[FEATURE] Expose current effort level (including "max") in statusLine JSON input
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:
- "max" effort is session-only and never persisted — the
effortLevelschema enum is["low", "medium", "high"], so max isn't stored anywhere accessible to a shell script - No hook fires for max —
ConfigChangeonly fires when files change, and max doesn't write to any file.UserPromptSubmitdoesn'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
effortLevelfromsettings.json— works for low/medium/high, but max leaves the previous value unchanged ConfigChangehook — doesn't fire for max (no file change)UserPromptSubmithook — 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)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗