Best PracticesApril 9, 2026 10 min read

Why Your OpenClaw Bill Is Still High (It's the Session Length)

You switched to Sonnet but your OpenClaw bill is still high. The hidden cost: every message re-sends your full history. Here's how /new saves 44%.

Shabnam Katoch

Shabnam Katoch

Growth Head

Why Your OpenClaw Bill Is Still High (It's the Session Length)

The hidden OpenClaw cost driver isn't your model choice — it's session length. Every message re-sends your entire conversation history as input tokens, so message 30 costs roughly 40x more than message 1 in the same session. Use /new every 20-25 messages and /btw for tangents to cut your bill by 44% without changing models or workloads.

You switched to Sonnet. You set up model routing. Your bill is still climbing. Here's the cost driver nobody explains.

I switched to Sonnet. My bill went from $87 to $32. Progress. Then over the next two weeks it crept back up to $58. Same agent. Same usage patterns. Same model.

What changed?

Nothing changed. I just stopped using /new. My conversations were running 40, 50, 60 messages deep. And every single message was carrying the entire conversation history as input tokens.

This is the OpenClaw API cost that nobody explains in the basic optimization guides. You can have the cheapest model, the best routing, spending caps configured perfectly. If your sessions run long, your input token costs grow linearly with every message. And that growth is the biggest line item on your bill.

The thing nobody explains about how OpenClaw charges you

Here's what nobody tells you about OpenClaw API costs.

When you send message number 1 to your agent, the API request contains your SOUL.md (system prompt) plus your single message. Maybe 500-800 tokens total. On Claude Sonnet at $3 per million input tokens, that costs $0.0015-0.0024.

When you send message number 10, the API request contains your SOUL.md plus all 10 previous messages plus the model's 10 previous responses. Maybe 5,000-8,000 tokens. Cost: $0.015-0.024.

When you send message number 30, the API request contains everything from the beginning. SOUL.md plus 30 messages plus 30 responses plus any tool results from those 30 exchanges. Maybe 20,000-30,000 tokens. Cost: $0.06-0.09 per message.

Message 30 costs roughly 40x more in input tokens than message 1. Same model. Same quality of response. Same everything, except your conversation history is now enormous and gets re-sent in full with every new message.

The viral "I Spent $178 on AI Agents in a Week" Medium post happened partly because of this exact mechanic. Long sessions with expensive models and no session resets. The per-message cost accelerated throughout each conversation.

Every OpenClaw message sends the ENTIRE conversation history as input. Message 50 doesn't cost 50 cents. It costs 50 messages worth of input tokens. This is the hidden multiplier that makes your bill climb even after you've switched to a cheaper model.

For the full breakdown of API costs including model routing and spending caps, our cost guide covers the other optimization levers. This post covers the one most people miss.

OpenClaw session cost growth chart showing input tokens accumulating from 500 at message 1 to 30,000 at message 30

How to check your actual session costs

Your model provider dashboard shows total token usage, but it doesn't show per-session breakdown. The easiest way to see the session cost escalation is to check the token count on individual requests.

Look at the input token count on a message early in a conversation versus one deep in the same conversation. If message 5 used 3,000 input tokens and message 40 used 28,000 input tokens, you're seeing the session length cost in real time.

The difference between those two numbers is the cost of carrying conversation history. Everything above the base request (SOUL.md plus your current message) is accumulated context that you're paying to re-send.

The /new command: your most important cost tool

The /new command resets your conversation session. It clears the active context window and starts a fresh conversation. Your persistent memory (MEMORY.md and daily logs) carries forward. The conversation buffer resets to zero.

After /new, your next message costs the same as message 1 again. Your SOUL.md plus your single message. No accumulated history. No 30,000-token context being re-sent.

Here's the weird part: most OpenClaw users never use /new. They let conversations run for days, accumulating hundreds of messages in a single session. Every message gets more expensive. The compaction system eventually kicks in to summarize the history (for the detailed explanation of how compaction works, our compaction guide covers the mechanics), but compaction only reduces the problem. It doesn't eliminate it.

Using /new proactively is better than waiting for compaction. /new gives you a clean slate. Compaction gives you a summary that's still hundreds of tokens. The cost difference adds up over weeks.

The /btw command for tangents

Here's another tool most people don't know about. The /btw command (short for "by the way") lets you ask a side question without adding it to your main conversation context.

If you're in the middle of a detailed support conversation and want to quickly check the weather or ask an unrelated question, using /btw keeps that tangent out of the main session history. The side question and response don't get added to the context that gets re-sent with every future message.

Without /btw, your weather check becomes part of the conversation context that your customer support thread carries forward. Wasteful tokens on every subsequent message.

A simple session hygiene routine

Here's the routine that cut my monthly API cost from $58 to $22.

Use /new when you switch topics. If you've been discussing customer support setup and want to switch to product descriptions, start a new session. The old topic's context doesn't help with the new topic. It only adds cost.

Use /new every 20-25 messages. Even if you're staying on the same topic, starting a fresh session keeps your per-message input costs manageable. Your persistent memory retains the important facts from the previous session. The conversation buffer resets.

Use /btw for quick side questions. Don't pollute your main session with tangential requests. Weather, quick calculations, unrelated lookups. Keep them out of the primary context.

Move recurring context to SOUL.md or workspace files. If you find yourself repeating the same information in every conversation (product details, company policies, personal preferences), put it in a file the agent can access. Don't re-state it in conversation where it accumulates in the context window.

How much this actually saves (real numbers)

Here's a concrete before-and-after based on a moderate-usage customer support agent on Claude Sonnet ($3/$15 per million tokens).

Before session hygiene (one continuous session per day):

Average 50 messages per day in a single session. Input tokens accumulate to roughly 525,000 total across all messages (the sum of message 1 through message 50, each carrying progressively more history). Output tokens: roughly 75,000 (responses average 1,500 tokens each). Daily cost: approximately $1.58 input plus $1.13 output = $2.71/day. Monthly: approximately $81.

After session hygiene (five 10-message sessions per day):

Same 50 messages per day, split into five sessions of 10. Input tokens: roughly 125,000 total (each session starts fresh, accumulation stays modest). Output tokens: same 75,000. Daily cost: approximately $0.38 input plus $1.13 output = $1.51/day. Monthly: approximately $45.

Savings: $36/month, or 44%. Just from using /new four times per day. Same agent. Same model. Same quality. Same number of messages.

Add model routing (Haiku for heartbeats, Sonnet for conversations) and the total drops further. For the complete model routing setup, our routing guide covers the configuration.

Session hygiene isn't about using your agent less. It's about not paying to re-send old messages you don't need. /new four times a day saves $36/month on a moderate-usage agent.

OpenClaw session hygiene before and after comparison showing $81/mo continuous session vs $45/mo split sessions

The cost optimization stack (in priority order)

If your OpenClaw bill is higher than you want, fix these in this order:

First: Model routing. Switch from Opus to Sonnet for most tasks. Route heartbeats to Haiku. This alone cuts costs by 70-80%. The cheapest provider combinations start under $10/month.

Second: Session hygiene. Use /new when switching topics and every 20-25 messages. Use /btw for tangents. This cuts the remaining cost by 40-50%.

Third: maxContextTokens. Set a hard cap on how much conversation history gets sent per request. This forces compaction earlier and prevents runaway context growth.

Most people do step one and stop. Steps two and three together save as much as step one. The total stack (routing plus sessions plus context limits) typically reduces a $150/month bill to $15-25/month for the same agent workload.

The managed vs self-hosted comparison covers which platforms include cost optimization features by default versus which require manual configuration.

If you'd rather not manage session hygiene manually, BetterClaw includes pre-tuned context management and automatic session boundaries. $29/month per agent, BYOK with 28+ providers. The cost optimization stack is built in so your agent stays cheap without you managing it.

OpenClaw cost optimization priority stack showing model routing, session hygiene, and maxContextTokens in order

Frequently Asked Questions

Why is my OpenClaw API cost higher than expected even on Sonnet?

The most common hidden cost driver is session length. Every OpenClaw message sends the entire conversation history as input tokens. By message 30, you're sending 20,000-30,000 input tokens per message instead of the 500-800 tokens message 1 cost. Session length causes input costs to grow linearly with every message, regardless of which model you use. Use /new to reset sessions every 20-25 messages.

How does session length affect OpenClaw API costs?

Each message in an OpenClaw conversation re-sends all previous messages and responses as input. Message 1 costs roughly $0.002 in input tokens on Sonnet. Message 50 in the same session costs roughly $0.10 because it includes 50 messages worth of accumulated context. A single 50-message session costs approximately $1.58 in input tokens. The same 50 messages split across five 10-message sessions costs approximately $0.38. That's a 76% reduction for identical content.

What does the /new command do in OpenClaw?

The /new command resets your active conversation session. It clears the conversation buffer (which accumulates with every message and inflates your input token costs) and starts a fresh context window. Your persistent memory (MEMORY.md, daily logs) carries forward, so the agent still knows who you are and what you've discussed. But the conversation history that gets re-sent with every API call resets to zero, bringing your per-message input cost back to baseline.

How much money does session hygiene save on OpenClaw?

For a moderate-usage agent (50 messages/day on Claude Sonnet), switching from one continuous session to five 10-message sessions saves approximately $36/month (from ~$81 to ~$45, a 44% reduction). Combined with model routing (Sonnet + Haiku for heartbeats), total monthly API costs can drop from $80-150 to $15-25. Session hygiene is the second most impactful cost optimization after model routing.

Does using /new make my OpenClaw agent forget everything?

No. /new clears the active conversation buffer (the messages that get re-sent with every API call) but does not clear persistent memory. Your SOUL.md remains active. Your MEMORY.md retains all stored facts. Daily memory logs preserve important information from previous sessions. The agent still knows who you are, your preferences, and your ongoing projects. It just doesn't carry the full text of your last 50 messages into the next conversation.

Tags:OpenClaw API cost session lengthOpenClaw reduce context costOpenClaw /new commandOpenClaw token cost per messagewhy is OpenClaw expensiveOpenClaw hidden costs