claude-code - 💡(How to fix) Fix /effort picker cursor ignores CLAUDE_CODE_EFFORT_LEVEL env var [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52678Fetched 2026-04-24 10:42:39
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

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.

Root Cause

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().

RAW_BUFFERClick to expand / collapse

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)

  1. export CLAUDE_CODE_EFFORT_LEVEL=max
  2. Launch Claude Code on a model that supports max (e.g. Opus 4.7).
  3. Run /effort — cursor is on xhigh, not max.
  4. Run /effort current — correctly reports Current 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.

extent analysis

TL;DR

Update the mh5 picker component to seed its initial index from DhH() or uwH() to reflect the effective effort level set by the CLAUDE_CODE_EFFORT_LEVEL env var.

Guidance

  • Verify that DhH() and uwH() correctly return the expected effort level when CLAUDE_CODE_EFFORT_LEVEL is set.
  • Update the mh5 component to read the initial index from DhH() or uwH() before falling back to the default value Zp7.
  • Consider adding a footer to the picker menu to indicate when CLAUDE_CODE_EFFORT_LEVEL is overriding the menu selection.
  • Test the updated component with different values of CLAUDE_CODE_EFFORT_LEVEL to ensure the picker correctly reflects the effective effort level.

Example

// Example of updating mh5 to seed initial index from DhH()
const initialIndex = DhH() ? getIndexOfEffortLevel(DhH()) : Zp7;

Notes

This fix assumes that DhH() and uwH() are correctly implemented and return the expected effort level. Additional testing may be necessary to ensure the updated component works as expected in all scenarios.

Recommendation

Apply the suggested fix to update the mh5 component to reflect the effective effort level set by CLAUDE_CODE_EFFORT_LEVEL. This will ensure that the picker menu accurately represents the current state and prevents user confusion.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix /effort picker cursor ignores CLAUDE_CODE_EFFORT_LEVEL env var [1 comments, 2 participants]