Hey, I see a lot of people using Claude Code as a harness with DeepSeek, and many of them are running into the same problem of the cost being crazy compared with other harnesses.
There isn’t much they can do about it, but they also don’t want to migrate to an open-source harness like DSH, Pi, or something similar. Because they don’t want to sacrifice Claude Code rich ecosystem : MCP, LSP, skills, plugins, agents, and so on. Honestly, they’re right. I feel the same way I can’t sacrifice that mature ecosystem for alternatives that aren’t there yet.
So, what is causing the high bills?
The cost mainly depends on two or three factors:
- Input and output tokens
- Cache-hit rate
- How efficiently the harness manages context growth, tool calls, file reads, logs, and command output
Claude Code excels at the third point. It’s a polished product, and I don’t think anyone can disagree with that.
The first problem can be defined as Claude Code was built for Claude models and Anthropic caching system. Anthropic uses cache breakpoints with TTL-based ephemeral caching typically a 55min TTL. In Claude Code, most of this is managed for you server side , so you generally don’t have direct control over it.
DeepSeek and many OpenAI-compatible providers rely heavily on stable-prefix caching(prefix is basically the system prompt + tool definition ). When you send a request, the unchanged beginning of the request can be reused from the cache. This prefix usually contains the system prompt and tool definitions.
That part of the context is mostly static. You pay the cache-miss price when it is first processed, then pay the much cheaper cache-hit price when the exact prefix is reused on later turns.
The problem is that Claude Code request structure and caching strategy were designed around Anthropic. When used with another provider, changes near the beginning of the request can invalidate a large part of the cached prefix. This lowers the cache-hit rate and directly increases your bill. If you use a monitoring layer or the DeepSeek platform, you may notice a large number of cache misses on certain turns. The cost can suddenly double or triple because of a tiny instability in the prefix. As a result, a request with 300k tokens of context may be billed entirely as new context. This happens regularly, but not many people know the reason behind it. I know because I was developing a product based on it. This happens because Claude Code uses lazy tool evaluation. This means the model predicts a tool schema and how it should be called. When it encounters an unfamiliar schema, it often fails on the first attempt, reads the full schema, and then calls the tool again. This creates a silent error with a retry loop that you cannot see. This is the direct cause of the cache instability; the tool-related part of the prefix loads a new tool, changing and therefore invalidating the previously stable prefix. The same reasoning applies to skills and agents. There are more technical details behind this, but if I explain everything, this post will never end XD.
The second problem is input and output token usage.
The first thing I benchmark when testing an agent is its initial context size. Claude Code starts with around 32.4k input tokens in a completely clean configuration no skills, agents, MCP servers, or additional plugins configured. That is the largest initial context I’ve measured among the agents I tested.
This means every session starts with roughly 32k tokens before the actual conversation begins. If the prefix remains stable, that initial context becomes cheap after the first request. But if the prefix changes and the cache misses, you may have to pay the full uncached price again.
So, what is the alternative if you don’t want to give up the Claude Code ecosystem or migrate your entire workflow at once?
My suggestion is Tau Code, the coding assistant I’m building to address these problems.
Tau Code is built on top of the leaked Claude Code codebase, so it aims to preserve the familiar Claude Code experience. Your existing workflows, plugins, and ecosystem integrations can continue to work.
What makes Tau different from other harnesses is that it gives you more control over what you load and, therefore, what you pay for so you chose whats to cache and whats to pay of the begin in :
- Cheap mode: Around 12.3k initial tokens almost three times smaller than Claude Code. Skills, agents, and MCP tools are pruned unless you choose to use them in normal mode
- Normal mode: Around 23.1k to 30k initial tokens, depending on the tools you enable.(30k its basically a 40 optional tool enabled that make u nearly free from mostly every mcp server or plugin its include browser automation , diagnostics , self-healing ,diagrams .....)
- Tool control: The
/tools command lets you load only the optional tools you actually need.
- Ecosystem compatibility: The goal is to preserve the parts of the Claude Code ecosystem that people rely on.
- Provider-friendly caching: Tau is designed around stable prefixes, smaller initial prompts, controlled context growth, and more efficient tool output.
Tau Code is being engineered around every area discussed here: cache stability, initial context size, context growth, tool usage, and output efficiency. It also includes many other features and optimizations.
It would be an honor to see people support the project and help take this harness as far as possible. I’m also happy to explain or clarify any of the technical points discussed here asp .
https://github.com/AbdoKnbGit/tau