Runtime reference
Qwen Code#
Qwen Code is a hard fork of Gemini CLI that rewrote the recorder, so it shares the lineage but not the format. Chat recording is opt-in, which is the first thing to check when a Qwen install shows no sessions.
| Runtime id | qwen_code |
| Category | Terminal coding agent |
| Vendor | Alibaba |
| Tier | Paid tier (Starter and up) |
| Upstream | github.com/QwenLM/qwen-code |
Where the data comes from#
ClawMetry reads these locations, in order, and never writes to any of them.
~/.qwen/projects/<project-hash>/chats/<sessionId>.jsonl
Format. One JSON record per line: a flat envelope (uuid, parentUuid, sessionId, timestamp, type, model) plus a nested message in Gemini Content.parts shape.
Environment variables#
| Variable | Effect |
|---|---|
QWEN_HOME | points AT the data dir (contrast with GEMINI_CLI_HOME) |
See Environment variables for the variables that apply to every runtime.
Tokens and cost#
Tokens. Real: usageMetadata carries prompt, candidates, thoughts, cached and total counts.
Cost. Not recorded — the endpoint may be a free local Ollama — so cost is left unknown rather than fabricated.
Why this section exists
Runtimes differ enormously in what they persist. Rather than showing a plausible number everywhere, ClawMetry reports what the store actually contains and marks the rest unknown. A cost of $0.00 and a cost of unknown mean different things, and the dashboard keeps them different.
Things worth knowing#
- Chat recording only happens with
--chat-recordingor thegeneral.chatRecordingsetting. Without it there is nothing on disk to read, and that is a Qwen setting, not a ClawMetry bug. <project-hash>is the working directory with/replaced by-, not a real hash.- The on-disk assistant role is Gemini's
"model"string; ClawMetry normalises it toassistant.
Verify it is being read#
# Is this runtime detected, and would this install unlock it?
clawmetry runtimes --json | jq '.runtimes[] | select(.id=="qwen_code")'
# Why is it locked, if it is?
clawmetry runtimes --why qwen_code
# Any sessions ingested yet?
curl -s 'http://localhost:8900/api/local/sessions?limit=5' \
| jq '.rows[] | {session_id, agent_id, events, cost_usd}'If detection succeeds but no sessions appear, work through Troubleshooting — the usual causes are a relocated data directory (set the override above), a session limit that is hiding older runs, or a runtime that simply has not written anything yet.