[BUG] Cargo run / build commands consumes way too many tokens

Resolved 💬 3 comments Opened Aug 12, 2025 by claychinasky Closed Aug 15, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <!-- output of claude --version --> 1.0.77 (Claude Code)
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> windows 11 ps
  • Terminal: <!-- e.g. iTerm2, Terminal App --> windows terminal

Bug Description

<!-- A clear and concise description of the bug -->
Whenever cargo run or cargo build command are executed token usage seems wrong.

Steps to Reproduce

  1. <!-- First step -->
  2. <!-- Second step -->
  3. <!-- And so on... -->

Expected Behavior

<!-- What you expected to happen -->
token usage should show be very minimal since there is almost no effort to call 'cargo run' command and no reason to pre-consume 500 tokens to run the command.

Actual Behavior

<!-- What actually happened -->
Whenever cargo run or build command is executed, before even write the command, token usage shoots up to 500, then it continues to raise up to 2k-3k in very little time while cargo run outputs no output. even use of RUSTFLAGS = "-Awarnings" flag doesn't seem to effect anything.

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗