nikivdev/code · error
no Codex state_<version>.sqlite database found under {}
Error message
no Codex state_<version>.sqlite database found under {} What it means
Error "no Codex state_<version>.sqlite database found under {}" thrown in nikivdev/code.
Source
Thrown at src/ai.rs:6205
.filter_map(|entry| entry.ok())
.filter_map(|entry| {
let path = entry.path();
let file_name = path.file_name()?.to_str()?;
let version = parse_codex_versioned_db_filename(file_name, "state_")?;
Some((version, path))
})
.collect();
candidates.sort_by(|a, b| b.0.cmp(&a.0).then_with(|| a.1.cmp(&b.1)));
if let Some((_, path)) = candidates.into_iter().next() {
return Ok(path);
}
let legacy_path = sqlite_home.join("state.sqlite");
if legacy_path.exists() {
return Ok(legacy_path);
}
bail!(
"no Codex state_<version>.sqlite database found under {}",
sqlite_home.display()
)
}
pub(crate) fn codex_state_db_path() -> Result<PathBuf> {
select_codex_state_db_path(&codex_sqlite_home()?)
}
fn codex_query_cache_disabled() -> bool {
matches!(
env::var(CODEX_QUERY_CACHE_ENV_DISABLE)
.ok()
.as_deref()
.map(str::trim)
.map(str::to_ascii_lowercase)
.as_deref(),
Some("1" | "true" | "yes" | "on")View on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/ai.rs:6205 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/29e0cc6c1e091661.
Report an issue: GitHub.