mux

Identity

  • Names: com.coder.mux; short alias mux.
  • Native format: mux-chat-jsonl, sessions/<workspaceId>/{chat-archive.jsonl,chat.jsonl,partial.json,metadata.json,subagent-transcripts.json}.
  • Session ID: Full native workspace/task directory ID. An archived child uses its own native directory ID, not a copied message workspaceId. No namespace.
  • Notes: metadata.usage combines several SDK steps, so use a non-cumulative usage summary covering the message, not inference. metadata.compactionBoundary supports compaction with unknown extent. Current metadata and the version-1 artifactsByChildTaskId index are snapshots. Copied workspace/run/turn IDs never assign side-fact ownership.

Position basis

  • Order and partials: HistoryService guarantees sealed archive before active chat. historySequence and a strictly longer part array select a partial replacement under the pinned contract. Emit it at the snapshot tail in a new capture. An unselected partial stays vendor data and cannot add a call occurrence. Archive-only and partial-only directories retain their native identity.
Use only positions established by the stated format and mapping evidence. Current-state rows without transcript positions form the snapshot tail, after all records with transcript positions. A protocol commit boundary takes precedence over physical EOF; uncommitted bytes are not a gap.

Destinations

mux: native facts without a standard field

  • Entity keys and links: Unique message id; dynamic tool toolCallId, toolName, input. The same tool object’s output is a result only for a uniquely owned invocation. Nested calls use recorded parentToolCallId, or the pinned nestedCalls ownership contract, with requestedBy: code. Output availability does not by itself prove success.
  • Lineage: The pinned archive layout sessions/<holder>/subagent-transcripts/<child>/chat.jsonl establishes subagent scope and only relatedUnknown to the holder. Cleanup can move grandchildren into ancestor folders and rewrite parentWorkspaceId. Neither the field nor the directory identifies the agent that directly spawned the child. No root or copy rule is qualified.
Trace the source’s writes and cleanup before interpreting parentWorkspaceId. Archival cleanup can move a descendant transcript to an ancestor and rewrite this field. An archive holder supports relatedUnknown; it does not identify the immediate spawner. Select partials by the native historySequence and greater-parts contract before indexing call IDs; partial files that were not selected are audit evidence.

Usage

Select one report per native accounting identity only when this entry establishes that identity. Keep reports that cannot be joined to an accounting identity, or that overlap, as native evidence. Declare any incomplete semantic coverage. Schema defaults and placeholder zeros are not reported usage. Backend inclusion rules require evidence; do not infer them from a model name. Per-message totalUsage spans steps. Emit a non-cumulative usage_summary covering the message; do not invent an inference.

Lane and unassigned facts

Facts without established session ownership use manifest _meta["com.coder.mux/unassigned"] with the common shape. An export 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. Use a documented vendor loss or report for omitted unassigned facts; do not create a new core category.

Evidence

Basis: source-verified: coder/mux 0.28.2, commit 033723270795d4694d24955d41959c53a7638d5a (historyService.ts, streamManager.ts, subagentTranscriptArtifacts.ts, message schema). Existing 0.27.0 fixtures are schema-authored. No live harness capture. Evidence applies only to the named formats and explicit mappings above. A real capture covers only the behavior that was exercised. A writer probe run without a model 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 mux/@coder/xum 0.32.0: Mux/@coder/xum 0.32.0 completed three CLI invocations. Two live snapshots yielded partial streams. The CLI removes temporary history on clean exit, and polling can miss final writes. These findings cover only the retained chat.jsonl/partial.json snapshots. Durable-events and blob storage need separate reconstruction; full-session coverage is not established. The ctx conversion produced 2 streams and 18 records, with 0 errors, 0 notices, 0 gaps and 0 unidentified inputs under validator-v0.1.2. These counts describe the selected output; an empty bundle qualifies no source format. No sanitized native fixture was retained for this observation. 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 to a provider metadata destination. These runs add no evidence for approvals, lineage links, compaction boundaries or exact request context that they did not exercise.