zeroclaw-labs/zeroclaw · error

Refusing ambiguous JSONL migration with both {} and {}

Error message

Refusing ambiguous JSONL migration with both {} and {}

What it means

Error "Refusing ambiguous JSONL migration with both {} and {}" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-infra/src/session_sqlite.rs:514

                .expect("candidate suffix checked")
                .to_owned();
            candidates.push((
                source_name.clone(),
                key,
                sessions_dir.join(&source_name),
                sessions_dir.join(format!("{source_name}.importing")),
                sessions_dir.join(format!("{source_name}.migrated")),
                staged,
            ));
        }
        candidates.sort_by(|left, right| right.5.cmp(&left.5).then(left.0.cmp(&right.0)));

        let mut migrated = 0;
        for (name, key, live_path, staged_path, migrated_path, staged) in candidates {
            let candidate_may_have_committed_receipt = staged && has_committed_import;
            if staged {
                if live_path.exists() {
                    bail!(
                        "Refusing ambiguous JSONL migration with both {} and {}",
                        live_path.display(),
                        staged_path.display()
                    );
                }
            } else {
                if staged_path.exists() {
                    bail!(
                        "Refusing ambiguous JSONL migration with both {} and {}",
                        live_path.display(),
                        staged_path.display()
                    );
                }
                if migrated_path.exists() {
                    bail!(
                        "Refusing to replace existing migrated JSONL session {}",
                        migrated_path.display()
                    );

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Remove one of the two conflicting JSONL files so migration is unambiguous, then retry.

When it happens

Trigger: Thrown at crates/zeroclaw-infra/src/session_sqlite.rs:514 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/5a0be12b5eaccf9d. Report an issue: GitHub.