API Error: 400 Invalid effort level (Claude Code and Claude API)
The request asked for more effort than your organization allows on that model. Update to Claude Code v2.1.314, which lowers the level and retries, or pick a lower one with /effort.
Summary
- On Claude Enterprise, admins can cap effort per model for each role; a request above the cap is rejected.
- Claude Code v2.1.314 and later lower the effort to the cap, retry and tell you which level they used.
- CLAUDE_CODE_EFFORT_LEVEL outranks /effort, so a value set in your shell can keep sending a level above the cap.
- Other clients that log in with a Claude subscription hit the same 400 when they send a fixed high effort.
On this page
Update Claude Code first
API Error: 400 Invalid effort level
The Claude Code changelog ties this message to organizations whose admin caps a model's effort. Version 2.1.314 fixed sessions that failed turn after turn with it: Claude Code now lowers the effort, retries and says which level it used. Claude Code on the web got a related fix in 2.1.268, for routines that resume a session and for sessions that start with no effort set.
claude --version
claude update
After updating, send the prompt again. If Claude Code tells you it ran at a lower level than you picked, that level is your organization's cap for the model.
See which level the session sends
On an older version, or when the error persists, lower the level yourself. Claude Code's model configuration page gives the order it uses, first match wins:
- The
CLAUDE_CODE_EFFORT_LEVELenvironment variable - A level picked in the session with
/effortor the/modelpicker - The
--effortflag at launch - Your settings: the level saved for the model, or an
effortLevelkey - The model's default:
mediumon Opus 5.5, Sonnet 5.5 and Haiku 5.5,highon most other models that support effort
Because the variable sits at the top, /effort cannot override a level exported in your shell profile. Check it first:
echo "$CLAUDE_CODE_EFFORT_LEVEL"
unset CLAUDE_CODE_EFFORT_LEVEL
Then run /effort and choose a lower level. Not every model has every level (Opus 4.6 and Sonnet 4.6 have no xhigh); Claude Code falls back to the highest level the model supports at or below the one you set.
How organization caps work
Two kinds of cap reach Claude Code, and when both apply to a model the lower one wins:
- On Claude Enterprise, admins set a maximum effort per model for each custom role (Claude Code v2.1.195 or later). Levels above it are not offered in
/effort, and asking for a higher one with--effortor/effortruns at the cap. If several of your roles grant the same model, the least restrictive cap applies. - On any plan and provider, including Amazon Bedrock, Google Cloud and Microsoft Foundry, the
maxEffortLevelmanaged setting caps effort on the client. The changelog dates it to v2.1.267.
Caps are per model, so switching models can change which levels you get. If you need a higher level than the cap allows, the person to ask is your organization's admin.
Other clients on a Claude subscription
Tools that call Claude with your subscription login can hit the same 400 without going through Claude Code's clamp. In pi issue #10063, the client always sent a top-level output_config.effort of high, so every request failed on accounts whose organization caps effort at medium, even when the user asked for low. The maintainer's fix sends a low top-level effort and sets the real level per message; asking explicitly for high or above can still fail there, because the client cannot see the cap.
In your own code, send an output_config.effort at or below your organization's cap for that model, and treat this 400 as a signal to step the level down rather than retry unchanged.
Turning off deep-reasoning triggers in Claude Code is covered in our CLAUDE_CODE_DISABLE_ULTRATHINK guide. If the 400 instead names between_tools or says effort is not supported when thinking is disabled, see the Sonnet 5.5 between_tools page, and the rest are on our Claude Code API Error 400 page.