Skip to content

How to Fix Claude Code CLI Performance: The Thinking Effort Setting

Problem

Claude Code started feeling dumber after a recent update. Complex refactoring tasks that used to take one shot now required multiple iterations. Code suggestions missed obvious patterns. Debugging sessions went in circles.

I thought I was imagining it until I found a Reddit thread with dozens of developers reporting the same issue.

Environment

  • Claude Code CLI (latest version)
  • macOS and Linux
  • Multiple projects (Python, TypeScript, Go)
  • Both new and existing codebases

What Happened?

I noticed the quality drop gradually. Tasks that Claude Code previously handled smoothly were now producing mediocre results:

  • Refactoring suggestions that missed edge cases
  • Code that didn’t follow existing patterns in the codebase
  • Explanations that felt shallow compared to before
  • More back-and-forth needed to get working code

At first, I blamed my prompts. Maybe I was being less specific? But after carefully reviewing my recent sessions, the prompts were fine. The output quality had degraded.

Then I found this on Reddit:

“Today I’ve set it to opus maximum effort and it is much better, CC update had it default to medium effort”

That was the clue. Claude Code had changed its default thinking effort setting.

How to Solve It?

First Attempt: Check the Documentation

I ran claude --help looking for thinking effort options:

Checking Claude Code help
claude --help | grep thinking
# --thinking-effort <level> Set thinking effort level (low/medium/max)

Good, the option exists. But what was the default?

Second Attempt: Test Different Levels

I created a simple test. Same prompt, different effort levels:

Testing thinking effort levels
# Test with medium (suspected default)
claude --thinking-effort medium "Refactor this function to be more readable" < src/utils.ts
# Test with max
claude --thinking-effort max "Refactor this function to be more readable" < src/utils.ts

The difference was immediately noticeable. Max effort produced cleaner, more thoughtful refactoring suggestions.

Third Attempt: Find the Settings File

I checked for a configuration file:

Looking for settings file
ls -la ~/.claude/
# settings.json exists
Initial settings.json
{
"$schema": "https://claude.ai/schema/settings.json"
}

The settings file existed but had no thinking effort configured. That confirmed it: Claude Code was using a default value, and that default had changed.

The Fix

I added the thinking effort setting:

Updated settings.json
{
"$schema": "https://claude.ai/schema/settings.json",
"thinkingEffort": "max"
}

After this change, Claude Code’s quality returned to what I expected.

The Reason

What Is Thinking Effort?

Thinking effort controls how deeply Claude reasons before responding:

LevelBehaviorBest For
lowQuick, shallow reasoningSimple queries, formatting
mediumBalanced reasoningGeneral tasks
maxDeep, thorough reasoningComplex coding, debugging, architecture

Why Did the Default Change?

Anthropic updated Claude Code’s default thinking effort from high to medium. This wasn’t documented prominently, causing confusion.

A Reddit user (score: 4) explained:

“I read that High effort was now the ‘same’ as Medium effort. I have had a lot of challenges getting claude to perform as ‘usual’ running on Medium Effort. Change effort from medium to max. This solved most of my performance issues.”

The change was likely made for efficiency, but for complex coding tasks, medium effort simply isn’t enough.

Where to Configure Settings

Claude Code reads configuration from multiple locations, with this precedence (highest to lowest):

  1. Command-line flags: --thinking-effort max
  2. Project settings: .claude/settings.json in your project root
  3. Global settings: ~/.claude/settings.json
  4. Defaults

For most developers, the global settings file is the right place:

~/.claude/settings.json
{
"$schema": "https://claude.ai/schema/settings.json",
"thinkingEffort": "max"
}

Per-Project Overrides

Some projects might benefit from different settings. For quick-edit projects:

.claude/settings.json (project-specific)
{
"thinkingEffort": "medium",
"model": "sonnet"
}

For complex architecture work:

.claude/settings.json (for complex projects)
{
"thinkingEffort": "max",
"model": "opus"
}

Other Useful Settings

While fixing the thinking effort, I discovered other settings worth configuring:

Complete recommended settings
{
"$schema": "https://claude.ai/schema/settings.json",
"thinkingEffort": "max",
"model": "opus",
"contextStrategy": "progressive",
"hooks": {
"PostToolUse": [
{
"matcher": { "toolName": "Write|Edit" },
"hooks": [
{ "type": "command", "command": "npm run lint -- --fix" }
]
}
]
}
}

The contextStrategy: "progressive" setting helps with large codebases by loading context on-demand rather than all at once.

Common Mistakes

Mistake 1: Relying on Defaults

WRONG: Empty settings
{}

After the update, this silently defaults to medium effort. Always be explicit:

CORRECT: Explicit setting
{
"thinkingEffort": "max"
}

Mistake 2: Using Max Effort for Everything

Max effort is expensive and slow. For simple formatting or quick questions, medium is fine. Consider task-specific configurations:

Task-specific settings
{
"thinkingEffort": "max",
"taskSpecificSettings": {
"quickEdit": {
"thinkingEffort": "medium",
"model": "sonnet"
},
"architecture": {
"thinkingEffort": "max",
"model": "opus"
}
}
}

Mistake 3: Not Verifying the Setting

I assumed my configuration was being applied. Always verify:

Verify settings are loaded
# Check what settings file is being used
claude config show
# Or manually inspect
cat ~/.claude/settings.json

Quick Diagnostic Script

I created a script to check my configuration quickly:

check-claude-config.sh
#!/bin/bash
echo "=== Claude Code Configuration Check ==="
SETTINGS_FILE="$HOME/.claude/settings.json"
if [ -f "$SETTINGS_FILE" ]; then
echo "Settings file: $SETTINGS_FILE"
echo "Thinking effort setting:"
grep -o '"thinkingEffort"[^,]*' "$SETTINGS_FILE" || echo "NOT SET (defaults to medium)"
else
echo "WARNING: No settings file at $SETTINGS_FILE"
echo "Claude Code will use defaults (thinking effort: medium)"
fi
if [ -f ".claude/settings.json" ]; then
echo ""
echo "Project settings found:"
cat ".claude/settings.json"
fi

Model Selection Note

One Reddit user mentioned:

“Switched to Opus 4.5, way better than 4.6 at this moment”

Model version matters too. If you’re using Opus and still seeing quality issues, verify your model setting:

Model configuration
{
"thinkingEffort": "max",
"model": "opus"
}

Summary

In this post, I showed how to fix Claude Code CLI performance by setting thinkingEffort to max. The key point is Claude Code now defaults to medium thinking effort, causing perceived performance degradation. The fix is simple: add "thinkingEffort": "max" to your ~/.claude/settings.json file. After this change, Claude Code’s quality should return to expected levels for complex coding tasks.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments