Why did qwen-code burn millions of tokens and push my Alibaba Cloud account into debt?
Users of the qwen-code CLI (QwenLM/qwen-code) reported in July 2025 that a simple git-commit summary prompt consumed roughly 6 million tokens while the displayed context window never changed. After the free quota ran out, Alibaba Cloud kept billing with no upper limit and accounts went into debt, with charges appearing about 30 minutes to an hour later. Is there a way to stop this runaway usage?
Originally asked on GitHub: https://github.com/QwenLM/qwen-code/issues/51
4 answers
Status: the issue was closed as completed, but the thread contains no maintainer fix or explanation, so the runaway billing behavior is not shown to be resolved.
What the reporters describe: the free quota did not act as a hard stop. After the free balance ran out, requests continued and Alibaba Cloud billed beyond it with no upper limit. Users said the debt only showed up roughly 30 minutes to one hour after usage. In one report, a prompt to summarize a git commit triggered a CLI bug that consumed more than 6 million tokens while the context window display stayed unchanged. In another, a task hung for 12 minutes and was canceled, and the resulting token usage was very large. Commenters asked for real-time key-consumption tracking, and one user said complaints to Alibaba Cloud customer service did not reverse the charges. Another commenter reported that a single unfinished task consumed several million tokens.
The thread provides no config option or CLI flag that caps spending. As general advice only, keep an eye on your Alibaba Cloud balance and billing directly instead of relying on the CLI's displays, especially while on a free trial.
Security and cost note: this behavior can create unexpected cloud charges, so treat the free quota as a limited budget to monitor rather than a spending cap.
Did this work for you?What @pkdog tried on GitHub (Didn't work)
Ran a simple prompt in the CLI to summarize a git commit. The run consumed over 6 million tokens, which the reporter attributed to a CLI bug, while the context window display stayed the same.
Source: https://github.com/QwenLM/qwen-code/issues/51#issuecomment-3106062798 (opens external site)
Did this work for you?What @nickdotcat tried on GitHub (Outcome unclear)
Canceled a qwen-code task after it hung for 12 minutes and then checked usage. The resulting token usage was very large; the thread does not say whether canceling stopped further consumption.
Source: https://github.com/QwenLM/qwen-code/issues/51#issuecomment-3106146911 (opens external site)
Did this work for you?What @pkdog tried on GitHub (Didn't work)
Contacted Alibaba Cloud customer service with complaints about the debt. The commenter reports this did not help and the charges remained.
Source: https://github.com/QwenLM/qwen-code/issues/51#issuecomment-3106242509 (opens external site)
Did this work for you?
Related questions
- Qwen Code shows far fewer tokens than Bailian bills — how do I stop charges and get a refund?
- qwen-code with OpenRouter: force a provider and fix OpenAI connection error?
- How do I enable Agentic Coding Protocol (ACP) support for qwen-code in Zed?
- Ollama qwen3-coder fails with "does not support tools" in qwen-code agent mode
- Does qwen-code support Anthropic-style sub-agents?