A prompt compressor that was supposed to save tokens made prompts larger
11/22/2026 — 11/22, 17:18·1 sources (all)·1 reports (all)
Key takeaways
- A developer reviewed a July investigation into a self-built context compressor that produced negative savings in long sessions: one run took…
Background & analysis
In July 2026, a developer doing an internal investigation found that a self-built context compression component was failing at its core job: instead of shrinking prompts, it was making them larger, with the effect most visible in long conversations. On 2026-11-22 at 16:50, that developer published a retrospective on the DEV Community AI section, laying out what the investigation turned up.
The write-up cites one manifest line from a long run: mode=compiler_pack stage=execution budget=47616, in which 26,461 tokens went in and 26,798 came out, leaving a negative saving of -337. Within session 7b3256c2, 21 of 69 packing passes produced negative savings, meaning the packed result was larger than what went in. The developer notes that the optimizer had been reporting the minus sign for days, yet nothing in their own tooling was actually reading that sign.
The post adds that the larger cost sat elsewhere. Under budget pressure, the packer discarded the result of a file read the model was actively using, which caused the same 5.6 KB file to be read again more than ten times. As of the post, the account stops at a record of the phenomenon and the observed run data, with no further resolution described.
AI-generated from 1 reports · updated 29 minutes ago
- Heat index
- 98
- All sources
- 1
- All reports
- 1
- First seen
- 57 minutes ago
Reports on this story headlines open the original
Writing up a July debugging session, a developer found his prompt-compression component was adding tokens instead of removing them: one run took 26,461 tokens in and produced 26,798, with 21 of 69 packing passes showing negative savings. The bigger cost was elsewhere: under budget pressure the packer dropped the tool result the model was acting on, so the same 5.6 KB file was fetched more than ten times.
DEV Community · AIAI score 58
Other stories people are talking about
- Heat index 1153RisingLean Community verifies Anthropic and Claude Riemann hypothesis proof22 sources
- Heat index 1023RisingAnthropic falls 8.5% on day two, closing the first week at a $1.6 trillion valuation21 sources
- Heat index 487Thinking Machines Lab Open-Sources Inkling 2 Mini with 32GB Model Card Recommendation10 sources
- Heat index 400SEC probes Nvidia accounting practices as shares post seven-week slide9 sources
- Heat index 343SurgeTesla begins rolling out FSD V15, Musk claims driving ability beats humans4 sources
How is heat calculated?About the methodHide
Heat counts how many independent sources covered a story in the last 48 hours: one source counts once no matter how many posts it published, decaying with a 24-hour half-life. What ranks first is what many people are talking about.
This page aggregates public feeds. Headlines and summaries are machine-organized and remain the property of the original authors; verify important facts at the source. If you believe a headline or summary infringes your rights, email the contact address in the footer with the page URL and basis of your claim, and we will remove or replace it after review.
- Surge
- Discussion rising fast
- New
- First report within 6 hours
- Rising
- Still gathering discussion

