Anthropic shipped a 1 million token context window for Claude Opus 4.6 and Sonnet 4.6 this week. It hit the top of Hacker News within hours. Everyone is talking about what you can fit in that window.
The better question is: what should you actually put in it — and what happens to your OpenClaw agent if you get that wrong?
This guide breaks down what actually changes for session design, HEARTBEAT scheduling, and cost management when you suddenly have a million-token canvas to work with.
What 1M Tokens Actually Looks Like
One million tokens is roughly 750,000 words, or about 1,500 pages of text. In practical terms for a developer's workflow:
- A full mid-size codebase (50–100 files)
- Several months of daily memory logs
- Every past conversation your agent has had this year
Before this week, you had to be deliberate about what you fed your OpenClaw agent. You had to prune, summarize, and scope. The 1M window removes that ceiling — but it doesn't remove the need for discipline.
What Changes for OpenClaw Session Design
For most agents, not much. A typical task-focused OpenClaw agent — one that triages email, monitors deploys, or handles customer questions — rarely needs more than 20–50K tokens in its working context. Your SOUL.md, AGENTS.md, USER.md, and a few memory snippets fit comfortably in that range.
The 1M window matters when you're building agents that need deep, continuous context across a large body of work:
- Code review agents that need to hold an entire codebase to give coherent feedback
- Research agents that accumulate and cross-reference hundreds of pages of notes
- Long-running project assistants that need full conversation history to stay coherent
If your agent does any of those jobs, the 1M window changes what's possible. You can now feed in the full project instead of summarizing it.
For everything else, your existing session design is fine.
When to Use It (and When Not To)
Use the larger context window when:
- Your agent genuinely needs to reference a large corpus in a single reasoning pass
- Summarization loses critical detail (legal documents, complex codebases, long research threads)
- You're doing a one-shot analysis that won't repeat (a migration audit, a code quality scan)
Don't use the larger context window as a lazy substitute for good session design. Loading 500K tokens of old memory into every HEARTBEAT run because you can is a fast way to a large API bill.
The right model: keep your recurring, scheduled sessions lean. Use the large context for deliberate, high-value tasks where the full corpus matters.
HEARTBEAT.md Implications
Your HEARTBEAT.md file schedules recurring tasks. These run on a schedule — sometimes every 15 minutes, sometimes hourly. Every HEARTBEAT run opens a session and consumes tokens.
With a 1M context window available, there's a temptation to front-load every HEARTBEAT session with everything the agent could ever need. Resist this.
A well-scoped HEARTBEAT task should still look like this:
## Hourly: SSL Certificate Check
- Check expiration for: api.yourapp.com, app.yourapp.com
- Alert via Telegram if < 14 days remaining
- Context needed: TOOLS.md, notification channel config
That task needs a few hundred tokens of context, not a million. Keep recurring tasks scoped to what they actually need. Reserve the large context for on-demand, human-triggered sessions.
A practical rule: if a task runs more than once a day, scope its context aggressively. If it's a weekly deep-dive or a manual analysis, go ahead and use the full window.
Token Cost Realities
More context capacity does not mean lower costs. The per-token pricing for Claude Opus 4.6 and Sonnet 4.6 is the same regardless of whether you use 10K or 1M tokens in a session.
The math is straightforward. At roughly $15 per million input tokens for Opus 4.6:
- A 10K token HEARTBEAT session: ~$0.15
- A 100K token session: ~$1.50
- A full 1M token session: ~$15.00
If your agent has 10 HEARTBEAT checks per day and you've padded each one with unnecessary context, you can go from a few dollars a month to hundreds without noticing.
Keep a close eye on your session logs. OpenClaw surfaces token usage per session — check it after you update any HEARTBEAT config that loads new context files.
Practical Recommendations for OpenClaw Users
1. Audit what your SOUL.md and AGENTS.md actually load. These files are injected into every session. Keep them focused. A SOUL.md that's grown to 10K words because you kept adding guidance is silently costing you on every run.
2. Use large context for analysis tasks, not maintenance tasks. A weekly codebase quality scan? Feed it the full repo. A daily status check? Keep it tight.
3. Version your workspace files. With larger context available, teams will be tempted to stuff more into agent configs. If you're using git to version-control your workspace bundle (you should be), you'll catch config sprawl in code review.
4. Test before you deploy. If you're redesigning a session to use significantly more context, run it manually and check the token usage before you let it run on a schedule. A mistake in a HEARTBEAT task compounds fast.
5. Don't rewrite working agents just because you can. If your current session design is working and the token cost is acceptable, leave it alone. The 1M window is a tool for specific use cases, not a reason to rebuild.
Common Mistakes
- Loading everything by default. Just because you can feed 1M tokens doesn't mean every session should. Most agents work best with focused, minimal context.
- Forgetting HEARTBEAT cost math. A session that runs 48 times a day needs to be optimized for token efficiency. Recurring tasks are where costs compound.
- Using large context to avoid good memory design. A well-maintained MEMORY.md that stores only relevant long-term facts beats a raw dump of every past conversation.
- Ignoring session logs. Token usage per session is visible in OpenClaw. If you don't check it after config changes, surprises will show up on your invoice.
- Treating "fits in the window" as "should be in the window." Context capacity is not the same as context necessity.
Security Guardrails
- Never put raw API keys or secrets in context files. A larger context window means more surface area for accidental credential exposure. Keep secrets in environment variables, never in SOUL.md, AGENTS.md, or any file fed into agent context.
- Audit what your agent can access before expanding context. More context often means the agent reasons across more files. Make sure those files don't contain anything you wouldn't want the model to process.
- Review agent actions before automating. If you're giving an agent access to a large codebase as context, verify its tool permissions are scoped to what it actually needs — not to everything in that codebase.
The Bottom Line
Claude's 1M context window is genuinely useful for specific workloads. If you've been struggling to fit a complex analysis or a large codebase into a single agent session, that problem is solved.
For everyday OpenClaw agents running on a HEARTBEAT schedule, your session design doesn't need to change. Keep recurring tasks lean, use large context deliberately, and check your token usage after any config update.
The best agents aren't the ones using the most context. They're the ones using exactly what they need.
Ready to design your OpenClaw agent right from the start? Generate your workspace bundle at OpenAgents.mom — the guided wizard builds SOUL.md, AGENTS.md, and HEARTBEAT.md with sensible, scoped defaults. EUR 4.99.
Build a Token-Efficient Agent from the Start
The OpenAgents.mom wizard generates lean, scoped workspace files so your agent spends its context budget on real work — not boilerplate. Get deploy-ready SOUL.md, AGENTS.md, and HEARTBEAT.md in minutes.