I cut my Claude Code token usage significantly without losing output quality β what's your setup?
Hey everyone π
Like a lot of you, I use AI coding agents (Claude Code / Codex) daily, and token usage adds up fast β especially on large codebases where the agent burns context just orienting itself.
I contribute to OpenObserve (open-source observability platform, large Rust + Vue codebase), and here's what's actually moved the needle for me:
CLAUDE.md / AGENTS.md files β a short project map (architecture, conventions, key file paths) so the agent doesn't re-explore the repo every session. Biggest single win.
Scoped prompts over vague ones β "fix the null check in parseQuery() in src/utils/query.ts" costs a fraction of "the query parser is broken, fix it."
Fresh sessions per task β long conversations drag the entire history into every request. Clearing context between unrelated tasks cuts spend noticeably.
Plan first, execute second β asking for a plan in plain text, approving it, then executing beats letting the agent trial-and-error its way through with expensive tool calls.
Right-sizing the model β using cheaper/faster models for boilerplate and refactors, saving the big model for architecture and tricky debugging.
Questions for the community:
- What's the one technique that cut your token bill the most?
- Anyone found a good way to handle monorepos where even a "project map" file gets huge?
Curious what setups people have landed on β feels like everyone's solving this independently right now.
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.