Nick Oak blog
← Back

wet claude

Wringing Excess Tokens. Claude is running dry. Make it wet.

The original itch was not abstract token minimalism. It was Claude Code auto-compact hitting at the worst possible moment: subagents running, context shredded, useful state forgotten, and one memorable Mac mini session cooking itself into 60 GB of swap.

The obvious culprit was stale tool output. Old `git status` dumps, spent logs, huge grep results, accidental file reads, and giant agent returns kept sitting in context long after Claude had acted on them. I wanted the missing hook: after tool execution, before the result enters the model context, inspect it, redact or compress it, then let Claude continue with the cleaned version.

That became the Claude Code feature request: let `PostToolUse` hooks replace built-in tool output, not only observe it or append more context. The ask was simple: if a Bash command returns 5k tokens and the signal is 50 tokens, let a hook keep the signal before it becomes permanent context sediment.

While waiting for that path, I built the workaround: wet, a Go proxy launched as `wet claude ...`. It sits between Claude Code and Anthropic, watches every `POST /v1/messages`, tracks tool-result blocks, estimates token weight, and gives Claude a control plane for deciding what should be compressed.

The fun part was making Claude meta-aware of the cleanup. wet was not only a dumb truncation layer. It came with a skill: profile the session, inspect stale blocks, preserve sacred/current context, compress deterministic Bash noise mechanically, and rewrite messy reads or agent returns through a smaller Claude subagent when needed.

The prototype worked well enough to prove the shape. Real sessions could reclaim tens of thousands of tokens; one public draft had a 39.6k to 4.7k example. More importantly, it made the context budget visible. Claude could finally see where its memory was going and operate on it instead of waiting for auto-compact to swing a hammer.

But status matters: wet is not currently active. It is better treated as a March 2026 artifact and proof-of-concept than as the thing I would recommend building new workflows around today. A request-level proxy has awkward edges with token caching, request stability, and Anthropic-side behavior that can change underneath it. The upstream surface also moved.

In Claude Code v2.1.121, the changelog said `PostToolUse` hooks can replace tool output for all tools via `updatedToolOutput`, and the current hooks docs describe that native path. That is the cleaner direction: use the host hook when it works, keep the transformation inside Claude Code's lifecycle, and avoid pretending a proxy is the long-term product boundary.

There is still a caveat: the ecosystem has reported rough edges around this feature, including `updatedToolOutput` not being honored for some tool paths. So the honest read is: wet proved why the feature should exist, the native hook is the right future, and the proxy remains a useful fossil from the month when the future had not quite landed yet.

Receipts: public repo, full blog post, originating Claude Code feature request, Claude Code changelog, and current hook caveat.