teamchong/pxpipe: cut Fable 5 token usage by rendering text context as images
Why CEREBRO kept it
Token optimization technique for Fable 5, direct LLM-mechanics win
The text below is an automated extraction of the article at https://github.com/teamchong/pxpipe, stored verbatim in the public cerebro-vault repository. Copyright remains with the original publisher (github.com).
Cut Claude Code's input tokens by rendering bulky context as images — the same system prompt, tool docs, and history, in a fraction of the tokens. An image's token cost is fixed by its pixel dimensions, not by how much text is inside it. Dense content (code, JSON, tool output) packs ~3.1 chars per image-token vs ~1 char per text-token on real Claude Code traffic. The reader is the same vision channel that Anthropic's computer use already relies on for screenshots. pxpipe is a local proxy that uses that channel for context: it rewrites the bulky parts of each request into compact PNGs before it
Backlinks
Appeared in 1 briefing