openai/codex · error · anyhow::Error
thread references an unknown section: {id}
Error message
thread references an unknown section: {id} What it means
Error "thread references an unknown section: {id}" thrown in openai/codex.
Source
Thrown at codex-rs/state/src/model/thread_metadata.rs:585
section_position,
section_entered_at_ms,
project_id,
git_sha,
git_branch,
git_origin_url,
} = row;
let thread_source = thread_source
.map(|thread_source| thread_source.parse())
.transpose()
.map_err(anyhow::Error::msg)?;
let history_mode = history_mode.parse().map_err(anyhow::Error::msg)?;
let section = match (section, section_name) {
(Some(id), Some(name)) => {
Some(ThreadSection::from_row((id, name, section_appearance))?)
}
(None, None) => None,
(Some(id), None) => {
return Err(anyhow::anyhow!(
"thread references an unknown section: {id}"
));
}
(None, Some(name)) => {
return Err(anyhow::anyhow!(
"thread has a section name without a section id: {name}"
));
}
};
Ok(Self {
id: ThreadId::try_from(id)?,
rollout_path: PathBuf::from(rollout_path),
created_at: epoch_millis_to_datetime(created_at)?,
updated_at: epoch_millis_to_datetime(updated_at)?,
recency_at: epoch_millis_to_datetime(recency_at)?,
source,
history_mode,
thread_source,View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/state/src/model/thread_metadata.rs:585 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/46799aff364d5d20.
Report an issue: GitHub.