My Claude Code quota died. I finished the week on Qwen Cloud — and it cost me exactly this much
My Claude Code quota died on a Tuesday. Mid-afternoon, mid-week, mid-job.
I was running an extraction over Jiao's Forest of Changes — also known as the Jiaoshi Yilin (焦氏易林), a Han-dynasty divination text with 4,096 cells of classical Chinese that my coding agent was pulling into structured data. It had days of work left. The quota had none.
If you build with AI in Hong Kong, you already live with the wall. The big US services block us, so we plan around it. We keep alternatives warm. What made this Tuesday different was not the wall. It was where it landed: my own daily driver, in the middle of a job only it knew the state of.
So I did the thing I had been meaning to try. I pointed Claude Code at Qwen Cloud and let it finish the week. This is what that week cost, measured to the token. The console gave me receipts, so this is not a vibes review. It is a bill.
The swap takes one settings file
Qwen Cloud (Alibaba Cloud's Model Studio, Singapore region) sells a Token Plan for exactly this. You get a dedicated API key and an Anthropic-compatible base URL. Anything that speaks the Anthropic protocol can hang off it — Claude Code, Cursor, Qwen Code, Codex, Qoder, OpenClaw.
I keep one settings file per backend and symlink the active one to ~/.claude/settings.json:
- -settings.json.claude — the normal week
- -settings.json.deepseek — my separate DeepSeek plan
- -settings.json.qwen — the week this article is about
The swap is a symlink change and a restart. The config that carried the heavy day looked like this, key cut:
| Key | Value |
|---|---|
| ANTHROPIC_BASE_URL | https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic |
| ANTHROPIC_AUTH_TOKEN | sk-sp-**** |
| ANTHROPIC_MODEL | qwen3.8-max |
| ANTHROPIC_DEFAULT_SONNET_MODEL | qwen3.8-max |
| ANTHROPIC_DEFAULT_OPUS_MODEL | qwen3.8-max |
| ANTHROPIC_DEFAULT_HAIKU_MODEL | qwen3.6-flash |
| CLAUDE_CODE_SUBAGENT_MODEL | qwen3.7-max |
| CLAUDE_CODE_MAX_CONTEXT_TOKENS | 983616 |
Hold the second-to-last row. It decides half this story.
Credits are not tokens
The Token Plan does not bill tokens. It bills credits, deducted per call:
credits = (input × coef_in + cached input × coef_cache + output × coef_out) / 10,000
Tool calls like web search bill on top, separately. The coefficients are per model, and they are published only in the console — not in the docs. The one worked example in public is qwen3.6-plus: roughly 5,000 fresh input tokens per credit, 25,000 cached tokens per credit, 830 output tokens per credit. Cached input is cheap, but it is not free. That clause does a lot of work later.
The personal plans, with the limited-time price in brackets:
| Plan | Price/mo | Credits per 7-day window | Concurrent agents |
|---|---|---|---|
| Lite | $8 ($6) | 2,500 | 1–2 |
| Standard | $25 ($18) | 10,000 | 3–4 |
| Pro | $80 ($68) | 40,000 | 6–8 |
| Credit Pack | $15 each | 20,000, not window-limited | up to 5 packs |
Three rules give the scheme its teeth:
- -The 7-day window starts at your first call, not at purchase.
- -Hit the limit and the service pauses. No soft degradation. The full 7 days have to elapse.
- -Unused credits do not roll over.
There is a Reset Usage Limit control, and a night rate: qwen3.8-max costs half between 22:00 and 08:00 HKT. Night-owl workflows are subsidized. Mine, as it turned out, were not.
The night of the 403
Before the plan caught, I spent one evening on plain pay-as-you-go. The request log from that night reads like a heart-rate monitor. One agentic session on qwen3.8-max, five minutes, input tokens climbing every single turn:
42k → 44k → 68k → 70k → 72k → 75k → 87k → 91k → 97k → 101k → 103k → 106k
That is about 1.28 million input tokens in five minutes. Every turn, the agent re-read the whole conversation so far. At list prices, that burst cost roughly $2.65 — and it ended the only way it could:
HTTP 403 — AllocationQuota.FreeTierOnly
The wall, caught live. That error is the moment I bought the Token Plan.
One day, two horses
The next day, the plan carried the real workload. I pulled the per-day numbers from the console afterwards. Here is the whole month of my Token Plan usage, in tokens:
| Day | Tokens |
|---|---|
| Aug 20 | 355,973,942 |
| Aug 27 | 692,314 |
| Aug 30 (writing this) | ~8,500,000 |
One day ate the week. The Token Plan throttles per rolling 7-day window, not per calendar month — the monthly chart just lines the windows up. That spike is a single working day burning its whole window's allowance: 356 million tokens. Then I split Aug 20 by model, and it got interesting:
| Model | Tokens | Cache-hit | Output | Share |
|---|---|---|---|---|
| qwen3.8-max | 183.6M | 94.3% | 794k | 51.5% |
| qwen3.7-max | 172.5M | 68.7% | 1.88M | 48.4% |
| qwen3.6-flash | 34.6k | — | 18.2k | 0.01% |
Two max-tier horses ran in parallel all day, almost exactly even. The shapes tell you who did what. qwen3.8-max was the reader — 94% cache-hits, short outputs, and all 621,000 image tokens, which were scanned pages feeding the extraction. qwen3.7-max was the writer — 2.4× the output, fresh context on every spawn, only 68.7% cache-hits.
Why were they running side by side? Look at the config again:
CLAUDE_CODE_SUBAGENT_MODEL — qwen3.7-max
The main loop ran 3.8-max. Every subagent Claude Code spawned ran 3.7-max. I had set that env var once, early, and never thought about it again. It quietly decided almost half of the day's bill. On list prices, 3.7-max is even dearer per token than 3.8-max — the model you park in the subagent slot is not a footnote. It is a cost decision.
The bill
Now convert the day to credits. Alibaba does not publish the qwen3.8 coefficients, so use the public qwen3.6-plus rates as a proxy and call it an order of magnitude:
- -3.8-max: ~10,100 credits (mostly the 172M cached tokens — 6,900 credits for cache alone)
- -3.7-max: ~17,600 credits
- -flash: pocket change
One working day ≈ 27,700 credits. The Standard plan gives you 10,000 for the whole week. That day was worth 2.8 Standard weeks. Pro's 40,000 survives roughly a day and a half of it.
This is the sequence I lived: Standard's 10,000 died mid-week, as the arithmetic says it must. I upgraded to Pro. I still bought the $15 credit pack — 20,000 credits, exempt from the window — and by the time I sat down to write this it was down to 8,841.89. The meter does not negotiate.
The fix that crossed back
Here is the part I did not expect. The lesson went back into my Claude setup, not just forward into Qwen.
Flat quotas hide the same thing credits expose: re-reading context is the real cost. My heavy sessions ran to the ~1M ceiling and re-sent everything every turn, exactly like the 403 night. So I set an auto-compact window:
CLAUDE_CODE_AUTO_COMPACT_WINDOW = 400000
At 400k, the session compacts its own history before the re-reads get expensive. The effect, measured one week later: a full week of heavy Claude Code work — the same kind of work that used to kill a quota by Tuesday — reached Sunday morning at 97% used. Three percent left, hours before the reset. Tight, but alive. Before the fix, mid-week death was the routine.
One more confession. When I built the fresh settings.json.qwen this week, I left the auto-compact window out of it. The lesson lived in my Claude config and nowhere else. I caught it before it mattered. If you keep configs per backend, audit all of them. Discipline does not transfer by itself.
If you're going in
Seven moves, each with a number behind it:
- -Set an auto-compact window before your first session.
CLAUDE_CODE_AUTO_COMPACT_WINDOWat 300–400k. This is the biggest lever: my unguarded day was 356 million tokens, and a compacted week of the same work fit inside one flat quota. The plan punishes re-reads. Compaction is how you stop re-reading. - -Never run an unguarded context ceiling.
CLAUDE_CODE_MAX_CONTEXT_TOKENSnear 1M with no compaction means the ceiling is your cost ceiling. Pair the two, or lower the ceiling. - -Choose the subagent model like a cost decision. My subagent lane took about half the day's tokens, at a lower cache-hit rate, with 2.4× the output. Read-only scouts: the cheap model. Generation that ships: the good one. Never leave it on whatever you set months ago.
- -Buy for your worst week, not your average day. Standard's 10,000 credits is real money for chat and light coding with one or two agents. Sustained agentic work — my day estimated at ~27,700 credits — means Pro, or Standard with packs standing by.
- -Use credit packs as the bridge, not the base. They are exempt from the 7-day window, which is exactly the shape of a spike day.
- -Shift what you can to the night rate. qwen3.8-max is half price between 22:00 and 08:00 HKT.
- -Watch your own meter for a week before trusting any rate table — including this article's. The coefficients are not published. Your workload is the only honest baseline.
One more thing: the older request-counted Coding Plan decouples cost from context length entirely. For long-context agentic work that is its whole argument — and it is why credits felt brutal until compaction tamed the re-reads.
What the meter teaches
Qwen Cloud is not a charity and the Token Plan is not magic money. It is a meter. That turns out to be its best feature.
A flat weekly quota tells you when you are out. A credit meter tells you what eats. Cached re-reads. Unguarded context ceilings. A subagent slot pointed at the wrong model. Every one of those is fixable, and you cannot fix what a flat quota hides from you.
Who is this for? If you are an HK developer, the access story is enough — it runs Claude Code against models you are actually allowed to use, with proper receipts for the finance team. If you are anywhere else, go in with eyes open: do not guess coefficients. Watch the meter for a week and calibrate to your own workload. Compact early. Guard the context ceiling. And choose your subagent model like you are paying per token.
Because you are.
Augustin Chan is co-host of the Hong Kong AI Podcast. The numbers in this article are taken from his own console: Token Plan usage API responses and request logs, captured 2026-08-30. Proxy credit rates are from Alibaba's published qwen3.6-plus example; treat estimates as order-of-magnitude.
Get notified when we publish new articles and episodes. No spam, just signal.