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

Resolved 💬 5 comments Opened Mar 15, 2026 by djoneverett 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 maxConfigChange 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 ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗