Claude Change Sonnet 4.6 to have 1 million Token context

Posted on Saturday, May 9, 2026


 


In Sonnet 4.6 of Claude the default is 200K for the context size. 
You can up it to 1 million by tweaking the ~/.claude/settings.json file


Change it!

Update claude

 

  > claude update

 

Start up Claude

 

  > claude

 

And run /context

 

  > /context

 

 



Here you can see I am running Sonnet 4.6 and the size of my content is 200K.

Now stop Claude and edit ~/.claude/settings.json

 

  > vi ~/.claude/settings.json

 

And add this to the json

 

"model": "claude-sonnet-4-6[1m]"

 

 


Now start up Claude again

 

  > claude

 

And run /context

 

  > /context

 

 

And now my context size is 1 million!

Now at this point I would not recommend 1 million for sonnet 4.6, unless you really need it.  A smaller context size of 200K can keep you more focused, but 1 million may be needed if you are doing some massive analysis or long runs.

See Claude 1M Context Window Goes GA: What Changes for Claude Code Users https://claudefa.st/blog/guide/mechanics/1m-context-ga [1]

 


 

What about for Opus 4.7?

Opus 4.7 is the most intelligent version Claude offers but it also costs more.  So how can we change to 4.7?

Stop Claude and edit ~/.claude/settings.json

 

  > vi ~/.claude/settings.json

 

And add this to the JSON

 

"model": "claude-opus-4-7"

 

 


Start Claude

 

  > claude

 

 

And run /context

 

  > /context

 

 


It looks like Opus 4.7 defaults to 1 million

There is a way!

Stop Claude and edit ~/.claude/settings.json

 

  > vi ~/.claude/settings.json

 

And add this to the JSON

 

"env": {
      "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}

 

 


Start Claude

 

  > claude

 

And run /context

 

  > /context

 

 


References

 

[1]       Claude 1M Context Window Goes GA: What Changes for Claude Code Users
             
https://claudefa.st/blog/guide/mechanics/1m-context-ga
            Accessed 05/2026

 

 

 

 

 


No comments:

Post a Comment