Token Optimization Guide
The Problem: 131K Tokens Per Cold Start
OpenClaw injects all 28 tool schemas into context at every session start. With no lazy loading, this costs 131K+ input tokens before your agent does anything. A 7-skill agent uses only ~14K tokens.
If your agent feels like it's "eating too many tokens," this guide explains why and how to cut cold-start costs by up to 90%.
Jump to Section
Quick Fix
Disable unused tools to immediately reduce token injection:
openclaw config get agents.defaults.tools
# Example: disable browser, exec, and file tools openclaw config set agents.defaults.tools.browser false openclaw config set agents.defaults.tools.exec false openclaw gateway restart
Why Cold Starts Are Expensive
Every time a new session starts (cold start), OpenClaw injects the full schema for every enabled tool into the LLM context. There is no lazy loading — all tool definitions are sent upfront so the model knows what's available.
Session starts
A new conversation begins (cold start) or the context window is reset.
28 tool schemas injected
Each tool's JSON schema (parameters, descriptions, examples) is added to the system prompt.
~131K input tokens consumed
Before your first message, 131K+ tokens are already used by tool definitions alone.
Every message adds to this base
Your messages, agent responses, and tool results stack on top of the 131K baseline.
Audit Your Tool Count
openclaw config get agents.defaults.tools
Count the tools in the output. Each tool schema adds roughly 2K-8K tokens depending on complexity. Browser automation and file tools are the heaviest.
Typical Tool Token Costs
Disable Unused Tools
Most agents don't need all 28 tools. A Discord chatbot doesn't need browser automation. A cron reporter doesn't need file tools. Disable what you don't use:
# Minimal setup for a chat-only agent openclaw config set agents.defaults.tools.browser false openclaw config set agents.defaults.tools.exec false openclaw config set agents.defaults.tools.file false openclaw gateway restart
Impact Analysis
Disabling browser + exec + file tools saves approximately 24K tokens per cold start. The agent can still chat, use memory, and send messages to channels.
Don't Disable Tools You Need
If you disable a tool the agent tries to use, it will fail silently or hallucinate the result. Only disable tools you're certain your workflow doesn't need.
/compact — Compress Context Mid-Session
During long conversations, the context window fills up with previous messages and tool results. Use /compact in your chat to compress the context and free up space:
Type in your OpenClaw chat:
This summarizes the conversation history into a compressed form, reducing token usage for subsequent messages.
Cost Calculator
Use our Agent Cost Simulator to see exactly how much your current tool configuration costs per session and per day:
Simulate Your Costs
Input your model, tool count, and daily usage to get a cost estimate. Compare before and after optimization.
Open Cost SimulatorCommunity Benchmarks
Real-World Token Usage (Community Data)
Full toolkit (28 tools)
~131K input tokens
15 tools (no browser/exec)
~72K input tokens
7 skills (chatbot only)
~14K input tokens
7 skills (DeepSeek V3.2)
~14K input tokens
Key Takeaway
Switching from 28 tools to 7 tools saves ~117K tokens per session. Combined with DeepSeek V3.2, you can reduce per-session cost from $0.39 to $0.004 — a 99% reduction.
Related Guides
More ways to optimize your OpenClaw setup:
Did this guide solve your problem?