caveman / proxy
AGENTS.md110k starsChanged 8 months agoApache-2.0View on GitHub
A base-URL-swap reverse proxy: match → authenticate → inspect → byte-safe transform → upstream → meter. Single-operator, BYOK, zero cloud dependencies. It shares its provider adapters with the managed gateway (the managed gateway imports them from here). caveman start launches the caveman-proxy binary. - listener lifetime is not session lifetime: serve never exits because a wrapper, native session, heartbeat, or idle timer expires. Legacy CAVEMAN_NATIVE_IDLE_TIMEOUT does not arm shutdown. The CLI never restarts a shared listener to change mode/recovery; an…
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about JuliusBrussee/caveman
- A Hacker News story“Caveman: Why use many token when few token do trick”Hacker News · Apr 5, 2026 · 904 points
- @laresai.danielesalatti.it“Someone made a Claude Code plugin that talks like a caveman to save tokens. Cuts output 65%. Accuracy …”Bluesky · Apr 5, 2026 · 21 likes
- @spaceprez.bsky.social“I had an intuitive feeling that cutting a lot of flowery language in genAI prompts would get identical …”Bluesky · Apr 30, 2026 · 14 likes
- @midu.dev“¿Quieres que tu sesión de Claude Code y Codex dure más? Haz que hable como un cavernícola. Esta Skill hace …”Bluesky · Apr 11, 2026 · 9 likes
- ayghri/i-have-adhd“Benchmarks on whether this reduces performance of the model”GitHub · Jul 19, 2026 · 7 reactions
The biggest 5 of 103 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 103
Talked about on GitHub, Bluesky and Hacker News (103 times).
On GitHub · 50
- Jul 19, 2026Benchmarks on whether this reduces performance of the model — ayghri/i-have-adhdsays it tested it7 reactions · 6 comments
- Apr 19, 2026feat(agents): add caveman gemini skill source — ooodnakov/ooodnakov-config2 reactions
- Nov 22, 2026Add caveman CLI (pinned 4.2.0) and skills; set DO_NOT_TRACK=1 — mmontes11/docker-opencode1 reaction
- Nov 20, 2026Add arakun shrink so every agent gets summarized command output — ArakunHQ/arakun1 reaction · 1 comment
- Nov 20, 2026Shrink Workers AI tool output by format (JSON, CSV, logs, tests) — ArakunHQ/arakun1 reaction · 1 comment
45 more on GitHub
- Nov 4, 2026RTK or caveman to reduce token consumption by default in just code ? — etalab-ia/codebox1 reaction · 1 comment
- Sep 3, 2026multiple system messages sent when a plugin uses experimental.chat.system.transform, breaks backends that require exactly one leading system message — anomalyco/opencode1 reaction · 2 comments
- Aug 18, 2026How or should I use this with caveman? — AminBlg/SimpleEnglish1 reaction · 3 comments
- Aug 8, 2026Comms — timerloggedout-spec/termux-monorepo1 reaction · 4 comments
- Jul 20, 2026feat(adhd): add ADHD output-shaping plugin (reauthor of i-have-adhd) — melodic-software/claude-code-plugins1 reaction · 4 comments
- Jun 15, 2026fix(docker): install git for repository scans — NVIDIA/SkillSpector1 reaction · 1 comment
- May 15, 2026New blog post — weblancaster/personal-blog1 reaction
- May 10, 2026Tools Comparisons alternatives — jgravelle/jcodemunch-mcp1 reaction · 6 comments
- May 6, 2026Add NPX installer for Linux and Windows replace current method — joshyorko/plugins1 reaction
- Apr 29, 2026feat: daily-caveman-optimizer — apply caveman optimization to .github/aw and .github/agents — github/gh-aw1 reaction · 1 comment
- Apr 22, 2026Token consumption reduction — KaugaKauga/familiar1 reaction
- Apr 18, 2026docs: cross-link caveman / cavemem / cavekit ecosystem — JuliusBrussee/cavemem1 reaction
- Apr 16, 2026[FEATURE] Caveman Mode: outbound prompt slimming to reduce generated tokens — headroomlabs-ai/headroom1 reaction · 1 comment
- Apr 10, 2026Enhancement: Add Caveman Token Management `speed go brrr` — github/squad1 reaction · 6 comments
- Apr 6, 2026Rename Blueprint to Cavekit across entire project — JuliusBrussee/cavekit1 reaction
- Nov 29, 2026Add caveman voice skills — NobleSeven7/Digilit-Project0 reactions
- Nov 28, 2026Use the caveman reply style in this project — mikecoa/personal-pos0 reactions
- Nov 27, 2026feat(skills): vendor caveman and caveman-compress (Apache-2.0) with guardrail exemptions — stefanasemota/vibe-coding-guardrail0 reactions
- Nov 27, 2026Plugin updates 2026-11-27 (review) — Fornida-Dev/fornida-claude-plugins0 reactions
- Nov 27, 2026fix(deps): bump gobwas/ws to v1.5.0 for GO-2026-6940 — JuliusBrussee/caveman-browse0 reactions
- Nov 26, 2026Try a read-only explore tool that searches outside the main context — ArakunHQ/arakun0 reactions · 1 comment
- Nov 26, 2026Measure and trim what every Workers AI request carries — ArakunHQ/arakun0 reactions · 1 comment
- Nov 23, 2026Upstream: caveman v4.1.0 → v4.2.0 — rbonweb/anthology0 reactions
- Nov 23, 2026Catalogue digest — 2026-11-23 — vatsalp2008/AI-Agent-Discovery0 reactions
- Nov 23, 2026chore(deps): bump the git-submodules group with 13 updates — wxxb789/hoa0 reactions
- Nov 22, 2026claude-code-plugins.github.juliusbrussee.caveman: 4.1.0 → 4.2.0 — sudosubin/agents.nix0 reactions
- Nov 22, 2026agent-skills.github.juliusbrussee.caveman: 4.1.0 → 4.2.0 — sudosubin/agents.nix0 reactions
- Nov 22, 2026claude-code-marketplaces.github.juliusbrussee.caveman: 4.1.0 → 4.2.0 — sudosubin/agents.nix0 reactions
- Nov 20, 2026Try a terse reply rule in Arakun Lab — ArakunHQ/arakun0 reactions
- Nov 20, 2026Try routing Workers AI steps between models, not only efforts — ArakunHQ/arakun0 reactions
- Nov 18, 2026Skills: ponytail and caveman for every session, and the founder's rule to use them — reidjxn/foundmill0 reactions · 1 comment
- Nov 16, 2026chore(deps): bump the all-updates group with 18 updates — eveeifyeve/nix-config0 reactions · 1 comment
- Nov 16, 2026Catalogue digest — 2026-11-16 — vatsalp2008/AI-Agent-Discovery0 reactions
- Nov 14, 2026Scout pitch: Read-less opt-in compression of command output — 8gi-foundation/8gent-code0 reactions
- Nov 12, 2026Add caveman skill for terse, low-token replies — moodyjones/Float0 reactions
- Nov 11, 2026Bump the compatible-packages group with 4 updates — delexw/motion-graphics-agent0 reactions
- Nov 10, 2026chore(deps): bump the all-updates group across 1 directory with 9 updates — eveeifyeve/nix-config0 reactions
- Nov 9, 2026Catalogue digest — 2026-11-09 — vatsalp2008/AI-Agent-Discovery0 reactions
- Nov 8, 2026agent-skills.github.juliusbrussee.caveman: 4.0.1 → 4.1.0 — sudosubin/agents.nix0 reactions
- Nov 8, 2026claude-code-marketplaces.github.juliusbrussee.caveman: 4.0.1 → 4.1.0 — sudosubin/agents.nix0 reactions
- Nov 8, 2026claude-code-plugins.github.juliusbrussee.caveman: 4.0.1 → 4.1.0 — sudosubin/agents.nix0 reactions
- Nov 7, 2026feat(app): install RTK, Caveman and Ponytail for an agent in one click — basilelt/overseer0 reactions
- Nov 5, 2026[Bug]: file:line refs in SKILL.md fail skill install — NousResearch/hermes-agent0 reactions · 2 comments
- Nov 4, 2026Add caveman agent skill — DavidCaua14/simulation0 reactions · 1 comment
- Nov 2, 2026Catalogue digest — 2026-11-02 — vatsalp2008/AI-Agent-Discovery0 reactions
On Bluesky · 50
- Apr 5, 2026Someone made a Claude Code plugin that talks like a caveman to save tokens. Cuts output 65%. Accuracy doesn't drop. "Bug in auth… — @laresai.danielesalatti.itsays it tested it21 likes and reposts · 4 replies
- Apr 30, 2026I had an intuitive feeling that cutting a lot of flowery language in genAI prompts would get identical results, but I generally avoid genAI… — @spaceprez.bsky.social14 likes and reposts · 1 reply
- Apr 11, 2026¿Quieres que tu sesión de Claude Code y Codex dure más? Haz que hable como un cavernícola. Esta Skill hace que tu agente responda en modo… — @midu.dev9 likes and reposts · 1 reply
- Sep 4, 2026we’re getting there — @ohnoim.online5 likes and reposts · 2 replies
- Jun 2, 2026lol github.com/JuliusBrussee/caveman/ — @nanojess.io5 likes and reposts
45 more on Bluesky
- May 20, 2026tem essa daqui tambem github.com/JuliusBrusse... — @punishedlynx.bsky.social5 likes and reposts · 1 reply
- May 6, 2026Clever way to save on your token usage: github.com/JuliusBrusse... — @dotmorten.xaml.dev5 likes and reposts · 1 reply
- Apr 7, 2026new conspiracy theory: llms are verbose and mansplainy and yes men because it burns more tokens which means the user can be charged for… — @funkjunkins.bsky.social5 likes and reposts · 2 replies
- Apr 5, 2026A Claude Code skill that makes Claude talk like a caveman, cutting token use https://github.com/JuliusBrussee/caveman… — @betterhn300.e-work.xyz5 likes and reposts · 2 replies
- Apr 5, 2026Talk like caveman | Discussion — @hackernewsbot.bsky.social5 likes and reposts
- Jun 20, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 JuliusBrussee / caveman ⭐ 75,013 (+314) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social4 likes and reposts · 1 reply
- Jun 4, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 JuliusBrussee / caveman ⭐ 68,598 (+471) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social4 likes and reposts · 1 reply
- Apr 30, 2026ולמי שמשלם על טוקנים מהכיס שלו github.com/JuliusBrusse... — @halfdino.bsky.social3 likes and reposts
- Apr 11, 2026Caveman! 😂 github.com/JuliusBrusse... — @kispocok.hu3 likes and reposts · 1 reply
- Apr 11, 2026Make your agent speak less. In a caveman-style language “why use many token when few do trick” It only affects output tokens —… — @qdrddr.bsky.social3 likes and reposts · 1 reply
- Nov 14, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 JuliusBrussee / caveman ⭐ 119,831 (+227) 🗒 Go 🪨 why use many token when few token do trick. Viral… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Jun 30, 2026Onko tämä tuttu? En ole itse ennättänyt testaamaan, mutta voisi helpottaa github.com/JuliusBrusse... — @jhilden.bsky.social2 likes and reposts · 1 reply
- Jun 11, 2026"No it's ok you see we can just make it talk like a caveman to save tokens :)" something a real actual living person said to me today... I… — @succupony.bsky.social2 likes and reposts
- Jun 5, 2026github.com/JuliusBrusse... — @l422y.com2 likes and reposts · 1 reply
- May 22, 2026installed caveman? brain trying to save tokens github.com/JuliusBrusse... — @marko.tech2 likes and reposts
- May 18, 2026caveman to shut that up github.com/JuliusBrusse... — @marko.tech2 likes and reposts · 1 reply
- Apr 27, 2026You're never gonna guess what's the hot new way to make chatbots/LLMs waste less tokens github.com/JuliusBrusse... — @damien.zone2 likes and reposts · 1 reply
- Apr 27, 2026repo: github.com/juliusbruss... enough said bye — @freek.bsky.social2 likes and reposts
- Apr 10, 2026Zwei Ansätze, um Token zu sparen: Tool-Output eindampfen https://github.com/rtk-ai/rtk Talk like caveman… — @timo.social.hetzel.net.ap.brid.gy2 likes and reposts
- Apr 5, 2026Claude Code skill that cuts 75% of tokens by talking like caveman 🪨 #technology #news #artificialintelligence #ai #claude #code — @todaystopainews.bsky.socialsays it tested it2 likes and reposts · 1 reply
- Nov 14, 2026github.com/luongnv89/c... - Free visual Claude Code guide kinetik-ui.dev - 136 animated React Native components morphin.dev - 27 free… — @csaba.bsky.social1 likes and repost
- Oct 3, 2026读 PhD 做的是压缩感知,结果给 coding agent 省 65% token 的办法,是让它像原始人一样说话。 caveman:让 coding agent 用原始人语说话来省 token 的 skill 和 proxy,号称能省… — @anotherbug.comsays it tested it1 likes and repost
- Aug 13, 2026Caveman skill github.com/JuliusBrusse... — @airowe.online1 likes and repost
- Jul 28, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 JuliusBrussee / caveman ⭐ 93,726 (+371) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Jul 8, 2026Caveman? Caveman no make brain smaller. Caveman make mouth smaller. Shrinks what the agent says, not what it knows. 🤣… — @neilvosslab.bsky.social1 likes and repost
- May 8, 2026A mí me pagan la sub de pago, lo malo es que no le puedo meter cosas como caveman. Que literal lleguemos a este punto es de risa más que… — @catpucchino.eurosky.social1 likes and repost · 1 reply
- May 1, 2026github.com/JuliusBrusse... - Get the #LLM to answer like a caveman - very brief - and save a ton of tokens. — @robrich.bsky.social1 likes and repost
- Apr 23, 2026Už jsi zkoušel toto? — @mecesty.cz1 likes and repost
- Apr 11, 2026What they don’t want you to find github.com/JuliusBrusse... — @stevedylan.dev1 likes and repost · 2 replies
- Apr 10, 2026tired of your AI agents' verbosity? make it talk like caveman. also save money by not needing many tokens 🔗… — @lostdomain.org1 likes and repost
- Apr 9, 2026Did you see this? github.com/JuliusBrusse... Who needs context embedded in language anyway? What's a bit of casual racism putting the… — @productnerd.bsky.social1 likes and repost
- Apr 5, 2026🌐原始人:少数のトークンでトリックが成功するのに、なぜ多くのトークンを使う必要があるのか? https://github.com/JuliusBrussee/caveman via #HackerNews — @kdmsnr.com1 likes and repost
- Apr 5, 2026Caveman: 🦴 Why use many tokens when few tokens do the trick? 🤔 Dive into this clever project optimizing token use in AI. ⚡ Efficiency… — @jerome-etienne.bsky.social1 likes and repost
- Apr 5, 2026Caveman: Why use many token when few token do trick https://github.com/JuliusBrussee/caveman https://news.ycombinator.com/item?id=47647455 — @hn100.atproto.rocks1 likes and repost
- Apr 5, 2026A Claude Code skill that makes Claude talk like a caveman, cutting token use https://github.com/JuliusBrussee/caveman… — @hn100.atproto.rocks1 likes and repost
- Apr 5, 2026LOL there's a #Claude Code skill that cuts 75% of tokens by talking like a caveman: github.com/JuliusBrusse... 😄 #ai #aicoding — @kevin.woblick.comsays it tested it1 likes and repost
- Oct 15, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 JuliusBrussee / caveman ⭐ 112,086 (+398) 🗒 Go 🪨 why use many token when few token do trick. Viral… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Aug 10, 2026De qualquer jeito fica ruim pro anti-IA tem que ser token-ascetismo. É curioso que tem até chinês literário pra token minimizing quero… — @cabra.pw0 likes and reposts · 1 reply
- Jul 21, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 JuliusBrussee / caveman ⭐ 91,533 (+529) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Jul 20, 2026maybe this thing made it in somehow? github.com/JuliusBrusse... — @ninachaubal.com0 likes and reposts · 1 reply
- Jul 9, 20265. Caveman. instructs the model to drop articles and polite openers. Blunt, exact, up to 75% token savings in output only.… — @lennartnacke.com0 likes and reposts · 1 reply
- Jul 6, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 JuliusBrussee / caveman ⭐ 85,408 (+969) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Jul 2, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 JuliusBrussee / caveman ⭐ 79,557 (+866) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Jun 16, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 JuliusBrussee / caveman ⭐ 73,316 (+557) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Jun 10, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 JuliusBrussee / caveman ⭐ 70,867 (+482) 🗒 JavaScript 🪨 why use many token when few token do trick… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
On Hacker News · 3
- Apr 5, 2026Caveman: Why use many token when few token do trick904 points · 366 comments
- Sep 10, 2026Respond terse like smart caveman. All technical substance stay. Only fluff die2 points
- Apr 16, 2026Caveman – why use many token when few do trick2 points
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- engine/AGENTS.mdAGENTS.md
- extension/AGENTS.mdAGENTS.md
- mcp/AGENTS.mdAGENTS.md
- mem/AGENTS.mdAGENTS.md
- shrink/AGENTS.mdAGENTS.md
- browse/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- engine/CLAUDE.mdCLAUDE.md
- extension/CLAUDE.mdCLAUDE.md
- integrations/CLAUDE.mdCLAUDE.md
- mcp/CLAUDE.mdCLAUDE.md
- mem/CLAUDE.mdCLAUDE.md
- proxy/CLAUDE.mdCLAUDE.md
- shrink/CLAUDE.mdCLAUDE.md
- skills/caveman-learn/CLAUDE.mdCLAUDE.md
- cavecrewSkill
- caveman-commitSkill
- caveman-compressSkill
- caveman-discoverSkill
- caveman-evidence-reviewSkill
- caveman-exploreSkill
- caveman-helpSkill
- caveman-learnSkill
- caveman-manageSkill
- caveman-optimizeSkill
- caveman-reviewSkill
- caveman-setupSkill
- cavemanSkill
- caveman-statsSkill
- investigate-firstSkill
- lean-buildSkill
- megacaveSkill
- migrationSkill
- safe-refactorSkill
- surgical-patchSkill
- ultracaveSkill
- verify-and-stopSkill
The file
Files
proxy — the byte-safe standalone caveman proxy (commercial, binary-distributed)
A base-URL-swap reverse proxy: match → authenticate → inspect → byte-safe transform → upstream
→ meter. Single-operator, BYOK, zero cloud dependencies. It shares its provider adapters with
the managed gateway (the managed gateway imports them from here). caveman start launches the
caveman-proxy binary.
Layout
providers/— the shared, public byte-safe adapter set:Adapterinterface +Baseembed +UsageScanner/ParseUsageBytes(adapter.go), andanthropic/openai/gemini/azureopenai/bedrock/vertex/openaicompat.ResolveUpstreamURLtakesproviders.RouteContext(no control-plane coupling). Anthropic + OpenAI carry both prefixed and bare routes (/v1/messages,/v1/chat/completions).vertexpreserves caller OAuth bearer or Express-mode Google API-key credentials for Gemini + Claude on Vertex AI (no signing, no environment-key fallback, no custom usage parser).internal/gateway/— the request lifecycle (server.go+proxy.go) behind three injected seams:Authenticator,CredentialResolver,TelemetrySink. Ports the managed loop with the fail-open fix.internal/config/—caveman.yamlloader + BYOK env-key resolution; unknown mode fails closed torecord.internal/store/—~/.caveman/caveman.dbSQLite spend store (modernc.org/sqlite, cgo-free); implementsTelemetrySink.internal/standalone/— wiring: staticAuth, BYOKCreds, adapter set, and the always-on SSRF-guarded client.internal/identity/— who calls the framework middleware routes (legacy token, token map, OIDC/JWT, mTLS) and the reloadable TLS listener config.cmd/caveman-proxy/— binary:serve(default),stats, and content-blindagent-evidence --session --build --plan. Evidence query returns only exact provider usage, request hashes, declared context/plan identity, ordered provider-prefix component hashes, actual transform IDs/counts, and CCR handle; basis is alwaysinferred, verified dollars always zero.
Conventions
- Build/test:
make product-build PRODUCT=proxy/make product-test PRODUCT=proxy. - Tests inject a plain
*http.Clientto reach loopback stubs; the binary uses the SSRF-guarded client. - New provider/optimizer work goes in
providers/(shared) — change it once, both proxies get it.
Gotchas (honesty invariants — correctness, not style)
- listener lifetime is not session lifetime:
servenever exits because a wrapper, native session, heartbeat, or idle timer expires. LegacyCAVEMAN_NATIVE_IDLE_TIMEOUTdoes not arm shutdown. The CLI never restarts a shared listener to change mode/recovery; an incompatible new wrap runs direct. Failed local startup also runs direct. Native session correlation entries may age out without affecting API traffic. - no default generation deadline:
CAVE_GATEWAY_UPSTREAM_TIMEOUT_MSdefaults to0(no total request deadline). A positive value is an explicit operator cap and includes response streaming. Client cancellation still cancels upstream; connection setup, inbound header/upload limits, and idle keep-alive socket cleanup remain bounded separately. The replacement bound for an upstream that connects and then goes silent is the transport's response-header deadline (CAVE_GATEWAY_RESPONSE_HEADER_TIMEOUT_MS, default 900000,0disables) — headers only, so it never truncates a live stream. - response protocol controls streaming: SSE/event-stream responses flush
headers and chunks even without a JSON
streamflag. Encoded requests keepContent-Encodingand bypass transforms. Interrupted response copies record an error and abort HTTP framing; they never become a clean successful EOF. - replay only when non-delivery is proven: proxy transport retries are
limited to connection-setup failures —
*net.OpErrorwithOpdialorproxyconnect(a proxy that is down fails as the latter, never as a dial). A failed upload/header read or truncated response does not prove an inference was unprocessed; do not automatically replay it. An explicit transformed-request 4xx still retries once with original bytes. Seedocs/technical/proxy-reliability.mdat the repository root. - byte-safe:
recordmode never transforms; on transform error the ORIGINAL bytes are forwarded (HTTP 200, fail-open) — never a 400. - request-wide opt-out:
x-cave-transforms: caveman.pass-through.v1suppresses every request transform path — compress, pixel, and provider-native — not only compiled plan routes. Tests cover all three modes. - no-fake-savings: standalone records
Basis: "inferred"on every row; it never writesverifiedand never re-projects to a monthly figure. - practice join: local learn sinks carry additive
practice_id; one fail-closed mapping table owns sink→practice and unknown sinks keep"". The historicalsubagent_overusesink is count-only and deliberately has no practice id: spawn count cannot reactivate the retiredcontext-exploration-offloadopportunity or prove any spawn unnecessary. - local trial heuristics are not actuation evidence: a model name never emits
the retired
model-right-sizingid, and provider plus positive cost never emits a cache move because neither proves stable-prefix eligibility. Legacy rows for those identities are hidden at read time. Compression replay reports one trial's local engineestimated_engine_o200kbefore/after shape with zero dollars and low confidence; it is not provider-counted, a rate, an invoice, causal/verified savings, or task-outcome evidence. - Anthropic automatic caching is experimental observation only:
anthropic-automatic-prompt-cacheis a typed, default-off manual policy experiment and may add only Anthropic's top-level 5-minute marker on direct Messages API requests. Managed traffic additionally requires server-attested official Anthropic origin; custom or provenance-unknown origins lose the flag before the adapter. It is mutually exclusive with the explicitanthropic-cache-breakpointstransform and any callercache_control; Bedrock and count-tokens requests stay byte-identical. An applied marker records only its optimizer id plus actual provider usage and cost. It has no practice, recipe, generic mode/candidate activation, ledger tuple, inferred savings, or verified-savings path (cache-only and forged IDs are excluded from the counted-baseline method too); evaluate it by manual paired observation because shared provider cache state can contaminate an A/B. - SSRF always on:
standalone.StandaloneHTTPClientguards every upstream dial (not gated onCAVE_ENV) usingssrf.SelfHostedConfig— NOT ManagedConfig, which ignores the allowlist and would make the escape hatch a silent no-op.CAVE_SSRF_ALLOWLISTopts loopback/private hosts back in (local model servers like Ollama;localhostas an entry covers 127.0.0.0/8 + ::1); metadata/link-local stay blocked in every mode. Provider traffic honoursHTTPS_PROXY/NO_PROXYby default (#1001) —upstream_proxy: env|off|<url>/CAVE_UPSTREAM_PROXY— viassrf.Config.Proxy, which validates IP-literal/localhost destinations before proxy selection and dials the (operator-configured) proxy address unguarded;ssrf.NewHTTPClientitself stays direct unless a caller setsProxy, and a managed-mode Config carrying one is refused loudly (every request fails withssrf.ErrProxyInManagedMode) rather than silently dialing direct. Adapters that pre-flight a resolved endpoint (bedrock, vertex) read the selector off the request context (providers.WithUpstreamProxy, published bygateway.Handlerfrom the upstream transport) and usessrf.ValidateURLNoResolvefor proxied destinations: a proxy-only network has no outbound DNS, so resolving there failed the request before the proxy was ever consulted.ca_bundle/CAVE_CA_BUNDLEplus inheritedSSL_CERT_FILE/REQUESTS_CA_BUNDLE/NODE_EXTRA_CA_CERTSappend private roots for TLS inspection throughshared/platform/cabundle(fail-closed parser shared with chhttp). - inbound token is consumed, never forwarded:
CAVEMAN_AUTH_TOKENgates non-loopback listens (a middleware token map, OIDC issuer or TLS client CA also makes one legal; provider routes still accept only the token, and without itAuth.closedrefuses every provider request off loopback);standalone.Authdeletes the matchingx-cave-api-key/Authorizationheader beforeCreds.Resolveso the shared token can never be forwarded to a provider or classified as a provider credential; a bearer that is not the token survives untouched (Claude OAuth,/chatgpt/).Authenticateruns BEFOREmatchAdapterso the 401/404 split cannot be used to enumerate routes, and every 401 goes throughServer.rejectUnauthorized, which countscave_proxy_unauthorized_totaland warns with the path and remote host only. Health and the no-op/caveman/keepalivebeacon stay unauthenticated,/metricstoo unlessCAVEMAN_METRICS_TOKENis set; theX-Caveman-Instanceheader on/health/liveis published only on a loopback bind. A token on a LOOPBACK listener is honored too (the localcaveman wrappath sends none, sorunServewarns). Bedrock credentials then come fromshared/platform/awscreds(env → web identity → container → IMDSv2), never from the request; a PARTIAL env pair fails closed instead of falling through to an ambient role, and the winning source is logged once. - middleware identity is server-side and per route:
middleware.Config.Identifyresolves anidentity.Principalfrom the credential alone (bearer decides when present, else a verified client certificate);ServeHTTP'sdecodechecksPrincipal.Allows(scope.Namespace)on EVERY scoped route, so a new route that skipsdecodeskips authorization. The legacy token stayssingle_operatorwith every namespace; JWT and certificate principals may never be namedsingle_operator. Token and hash comparisons are constant-time over every entry. A token map or TLS file that fails to reload keeps the previous one. Tests:identity/*_test.go(negative JWT and mTLS cases),middleware/identity_test.go. - Postgres middleware store keeps SQLite's single-writer semantics per authority:
store.PostgresMiddlewareserializes writers of one authority with a transaction-scoped advisory lock taken byScope(then re-read),SaveScope,Revoke,PurgeBatch,ReceiptandSaveOriginal; the sweep is one-replica (try-lock) and skips busy authorities and row-locked scopes. Counters are statement-level transition-table triggers striped by txid; a per-row trigger goes quadratic on bulk statements. Lock keys includecurrent_schema(). Run the store suite against both backends withCAVEMAN_TEST_POSTGRES_URL;middleware_concurrency_test.gofails without the locks. - Auth scheme is preserved: a key from an inbound
Authorization: BearerkeepsScheme:"bearer"on theproviders.Credential; Anthropic and Gemini forward bearer credentials as bearer credentials (Claude/Gemini OAuth breaks if remapped to an API-key header). BYOK env keys and inboundx-api-keykeep provider API-key mapping. On a named compat mount the header follows the wire protocol of the path:/compat/<name>/v1/messagesgetsx-api-keyplus a defaultanthropic-version, every other path gets Bearer. A real inbound Bearer stays Bearer on every path. OpenCode Go rejects Bearer on/v1/messages(401Missing API key., 2026-09-03). The gateway env fallback puts the key in the header that the adapter emitted, so the upstream never gets two credentials. - fail-closed: unknown route → 404; unknown mode →
record. - subscription AND oauth compression is NOT account-gated: non-PAYG sessions from Claude Code, Codex ChatGPT, Gemini CLI, and other routed clients take live-zone compression with no Caveman account, entitlement, or seat.
CAVEMAN_WRAP_ENTITLEDand everyWrapEntitledfield are deleted, not merely ignored — do not reintroduce them. Exactly four conditions remain, all technical and all fail-closed (liveZoneCompressionAllowed): the operatorsubscription_compressswitch (empty/live_zoneallow,offand any unknown value close it), the adapter must implement schema-awarePrefixStabilizerzones, recovery must run through the agent's own MCPcaveman_retrieve, and a durable prefix cache must be wired. The dedicated Codex/chatgpt/responsesroute uses the OpenAI Responses stabilizer while preserving OAuth andChatGPT-Account-IDheaders; transformed 4xx responses retry once with exact original bytes. Legacy savings fields remain tokens-only —compression_tokens_before/after+estimated_engine_o200k, never booked compression dollars. New request-comparison and price-snapshot fields support separately labeled API equivalents in local stats; those values never enter subscription spend or legacy saved-dollar fields. LOCAL wrap only; managed gateway non-PAYG behavior is unchanged. - cache safety is byte-stable replacement: a compressed live-zone turn becomes prefix on next request, so same logical message must re-serialize to deterministically identical bytes every time. Replacement is pure function of segment content (deterministic compressor + content-hash CCR marker), held in durable replacement cache and re-substituted below cache floor; new compression stays live-zone-only. Cache miss/write failure forwards original bytes. Cross-turn stability covers anthropic, openai, azureopenai/openaicompat, and gemini through
ExtractStabilizable;bedrockandvertexexpose no compressible blocks and stay pass-through. Anthropic uses declaredcache_control; OpenAI/Gemini use latest-user/latest-tool zones against implicit provider caches. Replacement cache is SQLite spend store and must retainjournal_mode(WAL)+busy_timeout. - pixel mode: S4 lossy text→PNG (
pxpipeport). Default allowlist isclaude-fable-5,gpt-5.6viaCAVE_PIXEL_MODELS; original request is always in CCR before transformed bytes are sent; savings stay inferred-only; any error is byte-identical pass-through. - boundary: this is public code — it must never import the managed-cloud lane.
make check-boundariesenforces it.
See ../../CLAUDE.md (root)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

