Claude Code model router

Wet

wet claude. Wringing Excess Tokens - transparent API proxy that compresses stale tool results in Claude Code sessions

Install

From source
git clone https://github.com/buildoak/wet.git

From the README

Wet Claude

*Wringing Excess Tokens Claude*

API proxy for Claude Code — teach your Claude to optimize its own context in a meta-transparent way.

Your Claude is running dry. Make it wet.

Why This Exists

Auto compact is brutal. It hits at the worst moments - mid-swarm, mid-experiment - and when it fires, it's all or nothing. Context gets shredded indiscriminately. Important computation goes rogue. Sessions derail. I've had a Mac Mini spiral to 60GB swap from the fallout.

So I audited thousands of tool calls across my Claude Code sessions. The culprit was obvious: 82% of context bloat is stale tool results - old git status outputs, spent pytest runs, massive grep dumps you already acted on, 30k-token agent returns you'll never look at again. They sit there, rotting, pushing you toward the autocompact cliff.

The problem: there's no hook to intercept tool results before they enter context. I checked Claude Code, Codex - nothing. Opened a feature request. I forked Codex and wired in my own compression hooks. I tried JSONL manipulation. Too dirty.

Then the insight: reverse proxy. A Go shim that sits between Claude Code and api.anthropic.com, intercepts every POST /v1/messages, and compresses stale tool results in-place before they reach the API. No client patches. No prompt wrappers. Clean.

But deterministic compression alone wasn't enough - it handles Bash outputs well, but agent returns and file reads need semantic understanding. So I flipped the script: instead of just compressing mechanically, put Claude in the driver's seat. Let it profile its own context, decide what's stale, and surgically rewrite its own tool results with a Sonnet subagent. Meta-compression - Claude optimizing Claude's context.

The result: instead of autocompact's sledgehammer, you get a…
Read the full README on GitHub

Details

Repository
buildoak/wet
Language
Go
License
MIT
Last updated
29 May 2026

FAQ

What is Wet?

wet claude. Wringing Excess Tokens - transparent API proxy that compresses stale tool results in Claude Code sessions It is a model router for Claude Code, from buildoak/wet on GitHub.

How do I install Wet?

Clone buildoak/wet from GitHub and follow the setup steps in its README.

Is Wet popular?

buildoak/wet has 40 GitHub stars and 7 forks. It was last updated on 29 May 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.