/effort picker cursor ignores CLAUDE_CODE_EFFORT_LEVEL env var
Summary
When CLAUDE_CODE_EFFORT_LEVEL env var is set, the /effort picker's initial cursor still lands on xhigh (the fallback default) instead of the effective level. The env var is actually in effect — DhH() and /effort current both correctly return max — but the picker UI misleads users into believing they're at xhigh.
Repro (v2.1.112)
export CLAUDE_CODE_EFFORT_LEVEL=max- Launch Claude Code on a model that supports max (e.g. Opus 4.7).
- Run
/effort— cursor is on xhigh, not max. - Run
/effort current— correctly reportsCurrent effort level: max.
Root cause (from bundled code)
mh5 (picker component) reads its initial index from the session atom Fh5, which is only written when the user picks a value via the menu itself. It never consults uwH() / the env var, so on a fresh session it falls back to Zp7 = 3 → xhigh. Meanwhile kp7 (showCurrentEffort) and DhH (effective effort) both honor uwH().
Suggested fix
Seed mh5's initial index from DhH() (or at minimum uwH()) before falling back to Zp7. Optionally render a footer noting CLAUDE_CODE_EFFORT_LEVEL=<v> is overriding this menu, consistent with the override message already returned by Nh5.
Impact
Low severity, but actively misleading — users reasonably trust the picker to reflect current state, leading them to "upgrade" from xhigh to max only to discover they were already at max.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗