zeroclaw-labs/zeroclaw · error
JSONL session {} reappeared during migration
Error message
JSONL session {} reappeared during migration What it means
Error "JSONL session {} reappeared during migration" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-infra/src/session_sqlite.rs:751
drop(conn);
if migrated_path.exists() {
if Self::source_fingerprint(&migrated_path, &name)? != expected {
bail!(
"Refusing incompatible migrated JSONL session {}",
migrated_path.display()
);
}
Self::sync_parent_directory(&migrated_path)?;
std::fs::remove_file(&staged_path)
.with_context(|| format!("Failed to finish staged JSONL handoff for {name}"))?;
Self::sync_parent_directory(&staged_path)?;
} else {
archive(&staged_path, &migrated_path, &expected)
.with_context(|| format!("Failed to archive imported JSONL session {name}"))?;
}
if live_path.exists() {
bail!(
"JSONL session {} reappeared during migration",
live_path.display()
);
}
migrated += 1;
}
Ok(migrated)
}
}
impl SessionBackend for SqliteSessionBackend {
fn load(&self, session_key: &str) -> Vec<ChatMessage> {
let conn = self.conn.lock();
let mut stmt = match conn
.prepare("SELECT role, content FROM sessions WHERE session_key = ?1 ORDER BY id ASC")
{
Ok(s) => s,View on GitHub (pinned to 88bb9c8533)
Solutions
- Do not recreate JSONL sessions while migration runs; remove the reappeared file and retry.
When it happens
Trigger: Thrown at crates/zeroclaw-infra/src/session_sqlite.rs:751 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/80249b19ac3bcda8.
Report an issue: GitHub.