claude-code - 💡(How to fix) Fix /effort with unknown arg silently sets level to max instead of rejecting [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#53716Fetched 2026-04-28 06:48:56
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
labeled ×2commented ×1

Passing an unrecognized argument to /effort (e.g. /effort auto) silently sets the effort level to max instead of rejecting the input or opening the picker. The confirmation message does not echo the input value, so it's easy to miss that the arg wasn't accepted.

Error Message

Either reject the unknown arg with an error listing valid values, or open the picker (same behavior as /effort with no arg).

Root Cause

Silent fall-through to the highest effort level changes model behavior and cost without the user realizing the arg wasn't accepted. A user typing /effort auto (a plausible value to try) ends up at max and won't know unless they check the status line.

RAW_BUFFERClick to expand / collapse

Summary

Passing an unrecognized argument to /effort (e.g. /effort auto) silently sets the effort level to max instead of rejecting the input or opening the picker. The confirmation message does not echo the input value, so it's easy to miss that the arg wasn't accepted.

Environment

  • Claude Code: 2.1.119
  • Platform: macOS (Darwin 25.4.0)
  • Model: Opus 4.7

Repro

  1. /effort auto → output: Effort level set to max
  2. /effort low → output: Set effort level to low: Quick, straightforward implementation with minimal overhead (works correctly)
  3. /effort (no arg) → opens the picker UI showing valid values: low | medium | high | xhigh | max (works correctly)

So /effort correctly handles known values and the empty-arg case, but unknown args fall through to max with no warning.

Expected

Either reject the unknown arg with an error listing valid values, or open the picker (same behavior as /effort with no arg).

Actual

Unknown args resolve to max. The confirmation line Effort level set to max looks identical to a successful /effort max, masking the parser miss.

Why this matters

Silent fall-through to the highest effort level changes model behavior and cost without the user realizing the arg wasn't accepted. A user typing /effort auto (a plausible value to try) ends up at max and won't know unless they check the status line.

Suggested fix

Validate against the allow-list (low | medium | high | xhigh | max) before applying. On mismatch, print the valid set and either no-op or open the picker. Echoing the resolved value in the confirmation (e.g. Set effort level to <value>) would also surface this class of bug to users.

extent analysis

TL;DR

Validate the input argument against a list of allowed effort levels before applying it to prevent silent fall-through to the maximum effort level.

Guidance

  • Check the input argument against the list of valid effort levels (low | medium | high | xhigh | max) to ensure it matches one of the allowed values.
  • If the input argument does not match any of the allowed values, print an error message listing the valid effort levels and either do not apply the change or open the picker UI.
  • Consider echoing the resolved effort level in the confirmation message to help users detect if their input was not accepted.
  • Review the current implementation of the /effort command to identify why unknown arguments are being silently set to max instead of being rejected or handled as an error.

Example

allowed_effort_levels = ['low', 'medium', 'high', 'xhigh', 'max']

def set_effort_level(arg):
    if arg not in allowed_effort_levels:
        print("Invalid effort level. Valid levels are: {}".format(' | '.join(allowed_effort_levels)))
        # Either open the picker UI or do not apply the change
    else:
        print("Set effort level to {}".format(arg))

Notes

The suggested fix assumes that the list of allowed effort levels is fixed and known in advance. If the list of allowed effort levels can change dynamically, additional modifications may be needed to handle this case.

Recommendation

Apply a workaround by validating the input argument against the list of allowed effort levels and handling unknown arguments as errors, as this will prevent silent fall-through to the maximum effort level and ensure that users are aware of the valid effort levels.

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 with unknown arg silently sets level to max instead of rejecting [1 comments, 2 participants]