How to Set Claude Code Effort Level: CLI Flags, Settings.json, and VSCode Configuration
Problem
I noticed Claude Code wasn’t giving me its best responses. Tasks that should have been handled with deep analysis were getting shallow treatment. Complex refactoring was rushed. Architectural decisions lacked the thoroughness I expected from Claude Opus.
When I checked my settings, I found the issue:
Default effort level: mediumI had assumed Claude Code would automatically use maximum effort for Claude Opus 4. But that’s not how it works. After the recent update, Claude Code defaults to “medium” effort for all models - including Opus.
I needed to change this. But the documentation was scattered. I tried several approaches, and only some of them worked.
Environment
- Claude Code CLI (latest version)
- Claude Opus 4.6 subscription
- macOS Sonoma
- VSCode with Claude extension
What I tried first
I started by searching for environment variables. That’s usually how I configure CLI tools:
export CLAUDE_CODE_EFFORT_LEVEL=maxI added this to my .zshrc, restarted my terminal, and ran Claude Code.
It didn’t work. The effort level remained at “medium.”
I tried other variations:
export CLAUDE_EFFORT=maxexport ANTHROPIC_EFFORT_LEVEL=maxexport CLAUDE_CODE_EFFORT=maxNone of them had any effect. I was going in the wrong direction.
The working solution: CLI flags
After more digging, I found that Claude Code supports an --effort flag directly:
claude --model claude-opus-4-6 --effort maxThis worked. I could verify it was using maximum effort because:
- Response times increased significantly
- The quality of analysis improved noticeably
- Complex tasks got more thorough treatment
But there was a problem: I had to type this every time. I wanted a persistent configuration.
The persistent solution: settings.json
I discovered that Claude Code stores settings in ~/.claude/settings.json. I checked mine:
{ "model": "claude-opus-4-6"}I tried adding the effort level:
{ "model": "claude-opus-4-6", "effortLevel": "max"}This worked. Now every session starts with maximum effort by default.
What about VSCode extension?
I use the Claude extension in VSCode, so I needed to configure that too. I found that the extension supports an /effort command:
/effort maxThis sets the effort level for the current conversation. But there’s a catch: it resets with every new conversation.
I couldn’t find a way to make it persistent in the VSCode extension settings. The extension doesn’t read from ~/.claude/settings.json the same way the CLI does.
For VSCode users, the workflow is:
- Start a new conversation
- Type
/effort maxbefore your main request - Continue the conversation at maximum effort
This is tedious but currently the only option.
Effort levels explained
I tested each effort level to understand the difference:
Low Effort:
- Response time: Fast
- Best for: Simple file edits, formatting, quick questions
- Example: “Change this variable name”
Medium Effort (default):
- Response time: Moderate
- Best for: Standard development tasks, bug fixes, code reviews
- Example: “Fix the null pointer exception in UserService”
Max Effort:
- Response time: Slow (can be 2-3x longer)
- Best for: Complex architecture, difficult debugging, multi-file refactoring
- Example: “Refactor the authentication system to use OAuth2 with proper token rotation”
The quality difference between medium and max is significant for complex tasks. Max effort gives you the full reasoning capability of Claude Opus.
The bug I encountered
While testing, I hit an issue where my settings.json kept getting reset:
// My configuration{ "model": "claude-opus-4-6", "effortLevel": "max"}
// After running Claude Code{ "model": "claude-opus-4-6" // effortLevel disappeared}I reported this and found it was a known bug. The settings file was being silently “upgraded” which stripped the effortLevel key.
Workaround: I now set the effort level via CLI flag even though I have it in settings.json:
alias claude='claude --effort max'This ensures I always get maximum effort regardless of what happens to my settings file.
Summary
In this post, I showed how to configure Claude Code’s effort level through trial and error. The key findings are:
- CLI flag works best:
claude --effort maxgives you reliable control - settings.json for persistence: Add
"effortLevel": "max"to~/.claude/settings.json - Environment variables don’t work:
CLAUDE_CODE_EFFORT_LEVELis unreliable - VSCode extension requires manual reset: Use
/effort maxeach conversation - Watch for bugs: Settings file can be silently downgraded
The effort level setting is essential for getting the most out of Claude Opus. Without it, you’re paying for maximum capability but only using medium effort.
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