3 ms·
Anyone have good tips or resources on token management best practices? Because I’ve hit the limiter with one single prompt now on Opus 4.7. What I’m reading so
by Esophagus4 6mo ago
Anyone have good tips or resources on token management best practices? Because I’ve hit the limiter with one single prompt now on Opus 4.7.
What I’m reading so far seems to be:
-selective use of models based on task complexity
-encoding large repos into more digestible and relevant data structures to reduce constant reingesting
-ask Claude to limit output to X tokens (as output tokens are more expensive)
-reduce flailing by giving plenty of input context
-use Headroom and RTK
-disable unused MCP, move stuff from CLAUDE.md to skills
But I’d love to learn if anyone has any good tips, links, or tools as I’m getting rate limited twice a day now.
- o10449366 6mo agoWhat was your single prompt? That seems highly unlikely.
- Esophagus4 6mo ago“Ok Claude, I bet you can’t hit the usage limit in one shot… let’s see what you got you little token gremlin” ;) I just asked it to do a security analysis in a subagent of an unmaintained browser extension and then go fix vulnerabilities it found so I can use it without worrying.
- o10449366 6mo agoSo it sounds like you were using it on auto mode then if it went ahead and fixed the vulnerabilities without additional turns? If so, that isn't really a single prompt.
- Esophagus4 6mo agoIt got limited while it was reading the repo before starting to fix, but yes you’re right. I think I was in auto mode or at least approving all the exploration.
- deleted 6mo ago[deleted]
- slawr1805 6mo agoThank you for sharing these tips! Just checked RTK and Headroom out and looks like Headroom actually uses RTK under the hood for CLI output compression: https://github.com/chopratejas/headroom#compared-to https://github.com/chopratejas/headroom#compared-to
- Esophagus4 6mo agoDidn’t realize that, thank you!
- ebcode 6mo agoI’m working on a tool that is a more token-efficient code search than grep. I don’t have hard numbers yet, but it’s been working for me to get longer sessions. https://github.com/ebcode/SourceMinder https://github.com/ebcode/SourceMinder
- Esophagus4 6mo agoOh nice! Thank you, I will definitely give this a shot. I was looking at tree-sitter myself for this task.
- ebcode 6mo agoIt's still in beta, and I'm hoping to get more feedback, so feel free to post in the issues or reach out directly if you run into any problems.
- vikgmdev 6mo ago[dead]