qwen-code

Identity

  • Names: qwen-code / io.github.qwenlm.qwen-code.
  • Native format: qwen-code-jsonl; qwen-code-chat-jsonl names the same UUID/parentUuid journal. Usage sidecars are not session journals.
  • Session ID: sessionId, except isSidechain with agentId identifies a child by agentId. Retain the parent’s sessionId in metadata. No namespace.
  • Entity keys: Message uuid; functionCall.id, functionResponse.id and recorded toolCallResult.callId. Never pair by order. An attributed response-usage report supports an inference derived from uuid; goalContext.turnId supplies a turn when present.
  • Notes: Provenance real_user establishes human; assistant_output establishes model; goal/system control establishes harness injection. Keep native usageMetadata. Whether reasoning tokens are included depends on the backend and is unknown unless independently recorded; do not assume candidatesTokenCount includes or excludes thoughts. Stored model is requested configuration. chat_compression.systemPayload records compaction metrics; NOOP enum 5 stays vendor data. compressedHistory lacks retained IDs and a summary boundary. resultDisplay is display content, with its native truncation units preserved.
  • Workspace and title: recorded cwd and gitBranch supply workspace state. custom_title.systemPayload.customTitle supplies title; titleSource: auto maps to model and manual to user under the pinned writer. An absent source stays unknown.

Position basis

See Gemini recording guidance for the shared recording family. Qwen backend accounting and writer evidence remain separate. Use only positions established by the stated format and mapping evidence. Current-state rows without transcript positions form the snapshot tail. A protocol commit boundary takes precedence over physical EOF; uncommitted bytes are not a gap.

Destinations

qwen-code: native facts without a standard field

  • Tree and lineage: parentUuid is the native parent; no response key is invented. A system rewind points to the last remaining parentUuid, unlike Gemini’s inclusive first-removed target. System parent_session.systemPayload.parentSessionId is the pinned create_sub_session spawning claim, but does not imply subagent scope. isSidechain plus agentId supplies child scope and spawning from sessionId. Per-record forkedFrom.sessionId and messageUuid identify a fork and copied original. They do not establish an unrecorded copied-prefix boundary or root.

Usage

Select the report tied to the recorded response once. The backend determines whether cached tokens are included in the counts and whether usage is reported or estimated. If that backend evidence is absent, keep cache inclusion unknown and preserve alternate reports as native evidence. Select one report per native accounting identity only when this entry establishes that identity. Keep unjoinable or overlapping reports as native evidence. Declare incomplete semantic coverage. Schema defaults and placeholder zeros are not reported usage. Rules for what a backend includes in its usage counts require evidence; do not infer them from a model name.

Lane and unassigned facts

Facts without established session ownership use manifest _meta["io.github.qwenlm.qwen-code/unassigned"] with the common shape. Selection may retain these facts with any session subset, including an empty subset, but must not imply session ownership. State the selection policy in the export report.

Losses

Declare every applicable loss under ASR-157. Missing model rendering, accounting joins, lineage or exact context boundaries remain losses when this entry does not qualify them. Unknown ownership is not itself lost data. For omitted unassigned facts, use a documented vendor loss or report; do not create a new core category.

Evidence

Basis: source-verified: Qwen Code 0.21.11, commit 259951c53e61ee1009401f35a69293360e2ad92c (chatRecordingService.ts, OpenAI converter and turn.ts). A native 0.26.1 capture using a deterministic API stub verifies basic persistence. Authored fixtures cover other semantics. Evidence applies only to the named formats and explicit mappings above. A real capture covers only exercised behavior. A no-model writer probe covers persistence, not model or tool execution. Authored tests do not qualify an agent version. Unlisted formats and link mappings remain unqualified.

Observations from 2026-10-27

observed, version 0.26.1: Qwen Code 0.26.1 retained edit, shell-test, resume, fork and an Explore child, plus a separate public fixture session. The fixture covers only one read/edit/test session. The parent-side spawn mapping remains incomplete (ASR-412); child discovery alone does not qualify the delegating link. Unknown extras use io.github.qwenlm.qwen-code/remainingFields. The ctx conversion produced 4 streams and 283 records, with 0 errors, 1 notice, 0 gaps and 0 unidentified inputs under validator-v0.1.2. These counts describe the selected output; an empty bundle qualifies no source format. The separately retained sanitized native fixture has capture@0.26.1 evidence for one read/edit/shell-test session only. The other runs remain observed evidence. Whole native records use native.record or native.blob, with JSON text columns preserved as strings. The exporter’s own bookkeeping for serialization, partitioning and message keys belongs in the exporter namespace (rs.ctx for ctx), not in a provider metadata destination. These runs add no evidence for unexercised approvals, lineage links, compaction boundaries or exact request context.