Skip to main content

Caveman Local Proxy Token Compression Benchmark Index

Benchmark index comparing Caveman skill-based token compression against baseline coding agent output, with Terminal-Bench 4 cost metrics and proxy configuration.

CODING & MCP Benchmark Study
Caveman skill + local proxy for coding agents: shorter answers, smaller tool output, every original recoverable
Caveman skill + local proxy for coding agents: shorter answers, smaller tool output, every original recoverable
Field Note · The Short Version 3 min read

Caveman cuts coding agent token spend by 21% on Terminal-Bench 4 versus Codex while matching Claude Code solve rates within noise.

Key Numbers & Verified Specs

6 metrics
Metric / Spec Verified Finding Source
Terminal-Bench 4 Codex cost per solved task $1.52 github.com
Terminal-Bench 4 Caveman Code cost per solved task $1.21 github.com
Terminal-Bench 4 Claude Code solve count 97 of 180 runs solved github.com
Terminal-Bench 4 Caveman Code solve count 83 of 177 runs solved github.com
Caveman license Apache-2.0, MIT github.com
Documentation site docs.caveman.so/caveman github.com
Jump to section (5) +

Caveman is a local proxy for coding agents that applies skill-based output reduction to shrink token spend without swapping models. The core claim is straightforward: shorter answers, smaller tool output, and every original message recoverable. For platform engineers running autonomous coding workflows, the question is whether the compression layer introduces enough latency or context loss to erase the savings.

Direct Engineering Verdict

Caveman Code costs 21% less than Codex per solved task on Terminal-Bench 4 with the same model on both sides. GPT-6.1 solves $1.21 per task versus $1.52 for Codex, with 90 of 192 runs solved by both. Against Claude Code Opus 5.5, Caveman Code lands within noise: 83 of 177 runs solved versus 97 of 180, at $5.19 versus $6.04 per solved task, with a 95% confidence interval of 0.70x to 1.02x. These figures come from measured benchmark builds, not the shipped app, and the shipped app may differ.

The verdict: adopt Caveman as a cost-control layer for high-volume agent sessions where model capability is already sufficient, but do not expect it to close capability gaps between weaker and stronger foundation models.

Token, Latency & Accuracy Comparison Table

SystemModelSolved RunsTotal RunsCost Per Solved Task95% IntervalSource
Caveman CodeGPT-6.190192$1.21N/ACaveman GitHub
CodexGPT-6.190192$1.52N/ACaveman GitHub
Caveman CodeOpus 5.583177$5.190.70x to 1.02xCaveman GitHub
Claude CodeOpus 5.597180$6.040.70x to 1.02xCaveman GitHub

Latency and exact token-count reduction percentages are not published in the repository readme. The proxy adds a network hop between agent and model, so expect sub-millisecond to low-single-digit-millisecond overhead locally, but measure it under your own concurrency before relying on it in production CI.

Failure Modes & Context Pollution

Skill-based compression risks stripping signals the model needs later. If Caveman removes reasoning traces or tool-output detail that a subsequent turn depends on, the agent may hallucinate or repeat work. The project claims every original is recoverable, but recovery requires storing and rehydrating full outputs, which adds storage and cache-invalidation complexity.

Context pollution works in reverse too. Compressed summaries fed back into the context window can drift from the original tool output, especially across multi-step debugging sessions. Teams should audit compression loss on long-horizon tasks before rolling out to autonomous agents that write production code.

The proxy itself is a single point of failure. If the local Caveman process crashes or misparses a tool call, the agent session breaks. Operators need health checks, circuit breakers, and a bypass path to the upstream model endpoint.

Minimal Reproducible Config / Harness Snippet

Caveman exposes plugin directories for Claude Code, Codex, Cursor, and Gemini, plus a proxy package. A minimal local proxy setup looks like this:

JSON15 lines
{
  "proxy": {
    "listen": "127.0.0.1:8765",
    "upstream": "https://api.anthropic.com",
    "skill": "caveman",
    "compression": {
      "mode": "skill-based",
      "retain_originals": true
    }
  },
  "agent": {
    "base_url": "http://127.0.0.1:8765",
    "timeout_ms": 30000
  }
}
Bash8 lines
# Install Caveman locally
curl -fsSL https://raw.githubusercontent.com/juliusbrussee/caveman/main/install.sh | sh

# Point Claude Code at the local proxy
export ANTHROPIC_BASE_URL=http://127.0.0.1:8765

# Run a benchmark session and inspect savings
caveman learn --session ./session-logs --report ./learn-report.png

The caveman learn command produces a summary and savings cards showing where tokens go in a session, plus a chart of context-window fullness over time. Use it to baseline compression impact before changing agent defaults.

When NOT to Adopt This Pattern

Do not use Caveman if your agents already run at the edge of context-window capacity on uncompressed output. Compression adds a processing step that can fail under malformed tool output or streaming edge cases.

Avoid it for tasks requiring exact tool-output fidelity, such as security audits or diff review, where a dropped line changes the finding.

Skip it if you cannot absorb the operational overhead of running and monitoring a local proxy alongside your agent orchestrator. The benchmark numbers are from measured builds, not the shipped app, so production cost per solved task may differ.

Caveman Learn report: token savings summary and session context utilization
Caveman Learn report: token savings summary and session context utilization
Caveman repository star history showing adoption curve
Caveman repository star history showing adoption curve

Caveman works best as a cost lever, not a capability lever. Measure your own session token distribution before committing to the proxy layer.

Caveman GitHub repository Caveman documentation Arjan Brussee LinkedIn post on Caveman

Reader Q&A

Frequently Asked Questions

Does Caveman require changing the underlying model?
No. Caveman is a local proxy and skill layer that compresses agent output and tool results; the same model runs on both sides of the comparison.
Is original agent output recoverable after compression?
Yes. The project states every original output remains recoverable after skill-based reduction.
What license covers Caveman?
Caveman is dual-licensed under Apache-2.0 and MIT.

Bibliography & Verification

Primary Sources & References

3 cited sources
  1. [01] github.com juliusbrussee / caveman
  2. [02] docs.caveman.so caveman
  3. [03] linkedin.com posts / arjanbrussee_github-juliusbrusseecaveman-why-use-activity-74472…

Human × Agent Co-Work

Hamdi Soudani · in collaboration with Pyvren

Systems engineer & technical writer exploring AI infrastructure, security, and edge craft in daily collaboration with Pyvren.

Hamdi Soudani × Pyvren

Honest engineering stories — co-crafted with primary benchmarks & real code

Every dispatch blends hands-on engineering judgment with verified primary sources, reproducible configs, and clear tradeoffs.