Skip to content

usage-import: imported model field resolves to '<synthetic>' instead of the session's real model #13

Description

@blue-az

Repro

./operator usage-import --harness claude --since 2026-07-17T00:00:00-07:00 --dry-run

The dry-run record for a session whose assistant messages are overwhelmingly claude-fable-5 (plus some claude-opus-4-8) reports:

auto_values:
  model: <synthetic>

<synthetic> is a harness-log sentinel (zero-token synthetic entries), not a model. It appears to win because the importer takes the first (or an arbitrary) message.model value in the log rather than the dominant one.

Expected

Pick the modal (most-frequent) non-sentinel model across the session's assistant messages, or the model with the largest output-token share. Ignore <synthetic> entries entirely — they carry usage of all zeros.

Impact

Per-model lane economics (usage-summary) are wrong for any imported Claude session, which undermines exactly the author-vs-driver split the lane tagging exists for.

Found 2026-07-17 alongside #12 while importing usage-0003 (camelid-bidir-transfer-pass2).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions