A blog post titled 'How to Save Tokens When Coding with AI Agents' has landed on Hacker News, and it's not quite what you'd expect from a typical tutorial. The piece offers three methods for reducing token consumption while coding with AI agents, but the advice ranges from genuinely useful to wildly impractical—and the whole thing ends with the author questioning whether they cleaned up an AI response before posting.
Method One: Hijack Command Output
The first technique suggests wrapping command-line programs in a bash script that discards verbose output entirely. By redirecting stdout and stderr to /dev/null and echoing only 'OK,' developers can supposedly prevent AI agents from wasting tokens on junky terminal noise. The author recommends creating a skill file that instructs the agent to prefix commands with something like '$ ok git status' instead of running them directly.
Method Two: Play Telephone With Your Codebase
The second approach advocates for what's described as a 'game of telephone.' Instead of feeding entire classes or files to the AI, you provide only class names and function signatures. The agent then hallucinates the implementation details on its own—a strategy that might save tokens but would likely introduce some interesting bugs along the way.
Method Three: Speak Less
The final tip encourages developers to communicate with their agents in extremely terse styles, going so far as to suggest using Classical Chinese. The author provides an example where a request for refactoring becomes '' and the agent responds accordingly in what they describe as elegant brevity.
A Self-Aware Ending
What makes this post noteworthy isn't the tips themselves but rather its closing line: 'Hold on, did I clean up the AI response in the beginning?' This meta-commentary suggests the entire blog post might have been generated by an AI assistant with minimal human editing—complete with placeholder text like 'Subtitle Yadda Yadda' that made it into the final version.
The Community Reaction
Hacker News readers gave the post modest visibility, with a handful of comments discussing which techniques they'd actually try. Several users noted they already use similar output suppression methods for their own agent workflows, while others pointed out that asking an AI to hallucinate code based on function names is probably not sound engineering practice.
The Bottom Line
This post walks the line between being genuinely helpful and a clever commentary on how developers are increasingly relying on AI to generate content about using AI. Whether you take the tips seriously or just enjoy the self-aware humor, it's worth bookmarking as a snapshot of where we are in the AI-assisted development era—where even tutorials about AI might be written by AI.
Key Takeaways
- Command output suppression can reduce token noise but requires careful setup
- Passing only function signatures forces agents to hallucinate implementations
- Extremely terse prompting styles may save tokens at a quality cost
- Always verify whether your tutorial sources are human-written before sharing