gogo-baton adds cold-cache cost interception to Claude Code
12/01/2026 — 12/01, 17:20·1 sources (all)·1 reports (all)
Key takeaways
- A developer built gogo-baton, a Node 20 tool for Claude Code that uses native hooks to estimate cold-rewrite costs in pay-as-you-go mode bef…
- a doctor command reads local records to calculate the real cache hit rate.
Background & analysis
On December 1, 2026, a post on V2EX introduced gogo-baton, a small utility for Claude Code written by its developer in Node 20. According to the author, it pulls in no third-party dependencies and keeps its data under ~/.gogo-baton/. The stated motivation was cost: when running Claude Code with a pay-as-you-go API key, a conversation that has grown to 150K context can sit idle past the 5-minute prompt cache window, and a single ordinary follow-up message then forces well over a hundred thousand tokens to be written cold again, producing a noticeably larger bill.
The tool works through Claude Code's native Hooks. It is installed with npx gogo-baton init --statusline. Once installed, if a user returns after being away longer than the cache lifetime and sends a message, pay-as-you-go mode first estimates the cold rewrite cost and blocks the request, while compressing the earlier context into five relay summaries. After the user runs /clear, a SessionStart hook restores the summaries together with the question just asked, and typing go resumes the work. The author notes two exceptions: subscription mode only shows a warning rather than blocking, and a message resent unchanged within 120 seconds is allowed through.
The package also ships npx gogo-baton doctor, which reads the local transcript to calculate the actual cache hit rate over a given period. The author mentions that the Hooks protocol cannot clear the screen automatically, so the core state machine was split out separately, but the post cuts off at that point without describing the resulting structure. This is currently the only report on the tool, and it ends with the author's description of its features and usage; no later version updates or independent verification from other sources are included.
AI-generated from 1 reports · updated 4 days ago
Related AI tools
- Heat index
- 25
- All sources
- 1
- All reports
- 1
- First seen
- 4 days ago
Reports on this story headlines open the original
A developer has released gogo-baton, a Node 20 tool that uses Claude Code's native Hooks to estimate and flag cold-cache rewrite costs in pay-as-you-go mode, while compressing context into five relay summaries. After /clear, a SessionStart hook restores the summary and the original question, and a doctor command reads local transcripts to compute real cache hit rates.
V2EXAI score 53
Other stories people are talking about
- Heat index 50How to Get Notified When Claude Code Waits for Input1 sources
- Heat index 41Using Codex and Claude Code to review each other's code1 sources
- Heat index 77When Claude Code plugins are worth building: a team's take1 sources
- Heat index 95NewDeveloper open-sources a Claude Code skill that interviews you before writing your blog post1 sources
- Heat index 95NewDeveloper runs 48 overnight scheduled jobs with Claude Code1 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

