Excessive Token Usage in Claude Code Mode for Programming Tasks
Resolved 💬 5 comments Opened Jun 30, 2025 by luckyHuangShuang Closed Aug 20, 2025
When using Claude Code (e.g., Claude 4 in "code" mode) for software development tasks, especially in multi-turn prompts, it consumes an extremely large number of tokens due to redundant output and context repetition.
This behavior significantly affects usability, particularly in scenarios where token limits are critical, or costs are tightly monitored.
- Claude Code tends to regenerate full context and inject previous instructions even in simple follow-up tasks.
- Outputs often include:
- Excessive comments, even when not requested.
- Verbose inline explanations after the code block.
- Full code structure including imports, test cases, or unused scaffolding.
- Blank lines and over-styled formatting that bloats token count.
Example:
Asking for a 10-line JavaScript function often results in a 100+ token reply due to extra formatting, header comments, and verbose reasoning.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗