How to Set Up Claude Opus 4.6 on OpenClaw — Step by Step
Why You Should Do This Right Now
On February 5, 2026, Anthropic released Claude Opus 4.6. It's a major upgrade over Opus 4.5:
- ●1 million token context window (5x larger than Opus 4.5's 200K)
- ●128K token output — generate entire documents, not just snippets
- ●Agent teams — multiple AI agents working in parallel on the same task
- ●Adaptive thinking — the model adjusts reasoning depth based on complexity
- ●Context compaction — auto-summarizes old context so long sessions never crash
It also set new records on Terminal-Bench 2.0 (agentic coding), GDPval-AA (enterprise tasks), and BrowseComp (web research). And pricing is unchanged: $5/$25 per million tokens.
If you're running OpenClaw, here's how to switch to it in under 5 minutes.
Prerequisites
- ●OpenClaw installed (
npm install -g openclaw@latest) - ●Anthropic API key configured
If you haven't set up OpenClaw yet, start with the official docs.
Step 1: Edit the Config File
Open your OpenClaw config at ~/.openclaw/openclaw.json and add or update these two sections.
Define Opus 4.6 in models
"models": {
"mode": "merge",
"providers": {
"anthropic": {
"baseUrl": "https://api.anthropic.com",
"api": "anthropic-messages",
"models": [
{
"id": "claude-opus-4-6",
"name": "Claude Opus 4.6",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 128000
}
]
}
}
}What matters here:
- ●
mode: "merge"— adds to OpenClaw's built-in model catalog without replacing anything - ●
reasoning: true— enables Opus 4.6's extended thinking mode - ●
contextWindow: 1000000— the full 1M token context - ●
maxTokens: 128000— 128K output capability
Set Opus 4.6 as default in agents
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-opus-4-6",
"fallbacks": [
"anthropic/claude-opus-4-5"
]
},
"contextTokens": 1000000
}
}This sets Opus 4.6 as the default model for all sessions, with Opus 4.5 as a fallback. The contextTokens value tells the agent it can use the full 1M context window.
Step 2: Restart the Gateway
After saving the config, restart OpenClaw to reload it:
openclaw gateway restartStep 3: Start a New Session
Existing sessions keep their old model config. You need a fresh session:
/newOr /reset. The new model kicks in from the next session onward.
Step 4: Verify
Check that everything is wired up correctly:
openclaw models statusYou should see anthropic/claude-opus-4-6 listed as the primary model.
From inside a chat session, you can also run:
/model statusIf it shows Opus 4.6, you're good.
What's Actually Different Day-to-Day
Beyond the spec sheet numbers, here's what you'll notice in practice:
- ●Longer sessions without drift — the model doesn't "forget" what you discussed earlier in the conversation. The 1M context window eliminates context rot.
- ●Better at catching its own mistakes — Opus 4.6 reviews its own code and reasoning more carefully. It'll spot bugs it introduced and fix them without you pointing it out.
- ●More autonomous on complex tasks — it breaks big tasks into steps, works through them, and recovers from errors along the way. Less hand-holding needed.
- ●Faster iteration on documents — spreadsheets, presentations, and reports come out closer to production-ready on the first attempt.
Quick Reference
| Step | Command | |------|---------| | Install/update OpenClaw | npm install -g openclaw@latest | | Edit config | ~/.openclaw/openclaw.json | | Restart gateway | openclaw gateway restart | | New session | /new or /reset | | Verify model | openclaw models status |