diff --git a/.cursor/rules/common-performance.md b/.cursor/rules/common-performance.md index 750bbb3a3..bc7b1b62b 100644 --- a/.cursor/rules/common-performance.md +++ b/.cursor/rules/common-performance.md @@ -43,7 +43,7 @@ rather than a fixed token budget. Available levels depend on the model. Control thinking via: - **Effort**: Use `/effort` in a session, `--effort ` at launch, or `CLAUDE_CODE_EFFORT_LEVEL`. Save a per-model level in `modelSettings` in `~/.claude/settings.json`; the older user-level `effortLevel` key does not apply to Opus 5.5 or newer models. - **Toggle**: Option+T (macOS) / Alt+T (Windows/Linux), or `alwaysThinkingEnabled` in settings. These cannot disable thinking on Opus 5.5, Sonnet 5.5, or Fable models. -- **Fixed budget**: A positive `MAX_THINKING_TOKENS` does not cap adaptive reasoning. On Opus 4.6 or Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to use a fixed budget with `MAX_THINKING_TOKENS`. +- **Fixed budget**: Claude Code ignores positive `MAX_THINKING_TOKENS` values on adaptive reasoning models. On Opus 4.6 or Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to use a fixed budget with `MAX_THINKING_TOKENS`. - **Verbose mode**: Ctrl+O to see thinking output See [Claude Code model configuration](https://code.claude.com/docs/en/model-config#adjust-effort-level) diff --git a/README.md b/README.md index b1b306ac9..dcb2df895 100644 --- a/README.md +++ b/README.md @@ -1725,10 +1725,15 @@ Add to `~/.claude/settings.json`: } ``` +The effort setting requires a model that supports effort controls. On Amazon Bedrock, +Google Cloud's Agent Platform, and Microsoft Foundry, the `sonnet` alias currently +resolves to Sonnet 4.5, which does not support effort controls. Select an effort-capable +model available from your provider, or omit `CLAUDE_CODE_EFFORT_LEVEL`. + | Setting | Default | Recommended | Impact | |---------|---------|-------------|--------| | `model` | opus | **sonnet** | ~60% cost reduction; handles 80%+ of coding tasks | -| `CLAUDE_CODE_EFFORT_LEVEL` | Model-dependent | **medium** | Controls adaptive reasoning depth; lower effort trades reasoning depth for latency and cost | +| `CLAUDE_CODE_EFFORT_LEVEL` | Model-dependent | **medium**, if supported | Controls adaptive reasoning depth on models that support effort controls; lower effort trades reasoning depth for latency and cost | | `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` | 95 | **50** | Compacts earlier, better quality in long sessions | | `ECC_CONTEXT_MONITOR_COST_WARNINGS` | on | **off for subscription users** | Suppresses agent-facing API-rate estimate warnings while keeping context/scope/loop warnings | diff --git a/docs/token-optimization.md b/docs/token-optimization.md index f3bf9259a..b6e00520e 100644 --- a/docs/token-optimization.md +++ b/docs/token-optimization.md @@ -22,12 +22,17 @@ Add to your `~/.claude/settings.json`: } ``` +The effort setting requires a model that supports effort controls. On Amazon Bedrock, +Google Cloud's Agent Platform, and Microsoft Foundry, the `sonnet` alias currently +resolves to Sonnet 4.5, which does not support effort controls. Select an effort-capable +model available from your provider, or omit `CLAUDE_CODE_EFFORT_LEVEL`. + ### What each setting does | Setting | Default | Recommended | Effect | |---------|---------|-------------|--------| | `model` | opus | **sonnet** | Sonnet handles ~80% of coding tasks well. Switch to Opus with `/model opus` for complex reasoning. ~60% cost reduction. | -| `CLAUDE_CODE_EFFORT_LEVEL` | Model-dependent | **medium** | Sets adaptive reasoning effort. Adjust it for task complexity; supported levels depend on the model. | +| `CLAUDE_CODE_EFFORT_LEVEL` | Model-dependent | **medium**, if supported | Sets adaptive reasoning effort on models that support effort controls. Adjust it for task complexity; supported levels depend on the model. | | `CLAUDE_CODE_SUBAGENT_MODEL` | _(inherits main)_ | **haiku** | Subagents (Task tool) run on this model. Haiku is ~80% cheaper and sufficient for exploration, file reading, and test running. | | `ECC_CONTEXT_MONITOR_COST_WARNINGS` | on | **off for subscription users** | Suppresses agent-facing API-rate estimate warnings while keeping context exhaustion, scope, and loop warnings. | @@ -154,7 +159,7 @@ The `configure-ecc` install wizard could offer to set these environment variable /cost # Check spending # Environment variables (add to ~/.claude/settings.json "env" block) -CLAUDE_CODE_EFFORT_LEVEL=medium +CLAUDE_CODE_EFFORT_LEVEL=medium # Only for models that support effort controls CLAUDE_CODE_SUBAGENT_MODEL=haiku CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 ``` diff --git a/rules/common/performance.md b/rules/common/performance.md index e8daa4174..db80f04d5 100644 --- a/rules/common/performance.md +++ b/rules/common/performance.md @@ -39,7 +39,7 @@ rather than a fixed token budget. Available levels depend on the model. Control thinking via: - **Effort**: Use `/effort` in a session, `--effort ` at launch, or `CLAUDE_CODE_EFFORT_LEVEL`. Save a per-model level in `modelSettings` in `~/.claude/settings.json`; the older user-level `effortLevel` key does not apply to Opus 5.5 or newer models. - **Toggle**: Option+T (macOS) / Alt+T (Windows/Linux), or `alwaysThinkingEnabled` in settings. These cannot disable thinking on Opus 5.5, Sonnet 5.5, or Fable models. -- **Fixed budget**: A positive `MAX_THINKING_TOKENS` does not cap adaptive reasoning. On Opus 4.6 or Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to use a fixed budget with `MAX_THINKING_TOKENS`. +- **Fixed budget**: Claude Code ignores positive `MAX_THINKING_TOKENS` values on adaptive reasoning models. On Opus 4.6 or Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` to use a fixed budget with `MAX_THINKING_TOKENS`. - **Verbose mode**: Ctrl+O to see thinking output See [Claude Code model configuration](https://code.claude.com/docs/en/model-config#adjust-effort-level)