Skip to main content
Claude token compression Claude Token Compression reduces token costs in Claude conversations by compressing tool call results, the large outputs from file reads, shell commands, search results, and other tools, before they reach Anthropic models. Unlike Agentic compression, it is fully lossless: no information is lost, and no quality configuration is needed. For Claude Code users, this means lower costs when using API billing (up to 30% reduction), and longer sessions for Pro/Max subscribers (up to 35% longer): the same token budget goes further.

What Gets Compressed

Claude Token Compression targets tool_result messages in Claude API format. This includes:
  • File contents: output from Read tool and file system operations
  • Grep and search outputs: results from code search, ripgrep, and similar tools
  • Shell command output: stdout/stderr from Bash and terminal commands
  • API responses: large JSON or text payloads returned by tool calls
  • Database query results: rows and records returned from tool-executed queries
User messages and assistant turns are not modified, only tool results are compressed.

Get Started

The fastest way is the Edgee CLI, compression is enabled automatically, no console configuration needed:
curl -fsSL https://edgee.ai/install.sh | bash
Verify the installation:
edgee --version
Then launch Claude Code through Edgee:
edgee launch claude
That’s it. Claude Code is now running with lossless token compression. After your session, the CLI prints a link to view savings in the Edgee Console.

Full CLI guide

Install the CLI, authenticate, and launch Claude Code or Codex in under a minute.
If you prefer not to use the CLI, enable Claude Token Compression from the Edge Models section of the Edgee Console: find the Claude Token Compression card and select which API keys to enable it for. Then configure Claude Code to route through Edgee, see Manual setup for instructions.
There are no compression ratio or quality threshold settings. Claude Token Compression is fully lossless by design.