Skip to content

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: medium

I 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:

Terminal window
export CLAUDE_CODE_EFFORT_LEVEL=max

I 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:

Terminal window
export CLAUDE_EFFORT=max
export ANTHROPIC_EFFORT_LEVEL=max
export CLAUDE_CODE_EFFORT=max

None 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:

Terminal window
claude --model claude-opus-4-6 --effort max

This worked. I could verify it was using maximum effort because:

  1. Response times increased significantly
  2. The quality of analysis improved noticeably
  3. 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 max

This 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:

  1. Start a new conversation
  2. Type /effort max before your main request
  3. 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:

Terminal window
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:

  1. CLI flag works best: claude --effort max gives you reliable control
  2. settings.json for persistence: Add "effortLevel": "max" to ~/.claude/settings.json
  3. Environment variables don’t work: CLAUDE_CODE_EFFORT_LEVEL is unreliable
  4. VSCode extension requires manual reset: Use /effort max each conversation
  5. 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