I believe this can be configured in Claude Code via the following environment variable:
ANTHROPIC_BETAS="context-1m-2025-08-07" claude
ANTHROPIC_BETAS="context-1m-2025-08-07" claude
https://docs.anthropic.com/en/docs/claude-code/settings#envi...
Add these settings to your `.claude/settings.json`:
```json
{
"env": {
"ANTHROPIC_CUSTOM_HEADERS": {"anthropic-beta":
"context-1m-2025-08-07"},
"ANTHROPIC_MODEL": "claude-sonnet-4-20250514",
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": 8192
}
}
````cat $(which claude) | grep ANTHROPIC_BETAS`
Sibling comment's approach with the other (documented) env var works too.
[1] https://docs.anthropic.com/en/docs/build-with-claude/context...