cd /news/ai-tools/cool-little-hack-using-claude-code-w… · home topics ai-tools article
[ARTICLE · art-115842] src=news.ycombinator.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Cool little hack using Claude Code watching files with tail -f

A Hacker News user shared a technique to reduce token costs in Claude Code by using tail -f to watch files, allowing multiple chats to maintain a warm read cache at 10% of normal token cost. The method involves creating a folder outside git, placing a .md file per chat, and having an orchestrator coordinate the chats, each retaining the cheap read cache instead of starting fresh sub-agents.

read1 min views10 publishedAug 30, 2026

| |||||||||||| 1 point by | Claude Code will watch a file using tail -f and notice any change to the file waking up. Read cache tokens are 0.1x (10%) the cost of normal tokens so we want to use them. Every time a sub agent starts it has a fresh cache losing that benefit. Start a few chats with model and effort. Create a folder not tracked by git and put a .md document for each chat. Let the chat know to watch its own file for changes. Then start an orchestrator telling it which chats are watching which files. It will coordinate work between the chats like starting a sub agent but each will have that cheap read cache already set. | ||||||||||| |

── more in #ai-tools 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cool-little-hack-usi…] indexed:0 read:1min 2026-08-30 ·