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. | |||||||||||| 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. | ||||||||||| |