openai/codex · error · anyhow::Error
multiple agents found for canonical path `{agent_path}`
Error message
multiple agents found for canonical path `{agent_path}` What it means
Error "multiple agents found for canonical path `{agent_path}`" thrown in openai/codex.
Source
Thrown at codex-rs/state/src/runtime/threads.rs:1179
Ok(rows_affected)
}
}
fn one_thread_id_from_rows(
rows: Vec<sqlx::sqlite::SqliteRow>,
agent_path: &str,
) -> anyhow::Result<Option<ThreadId>> {
let mut ids = rows
.into_iter()
.map(|row| {
let id: String = row.try_get("id")?;
ThreadId::try_from(id).map_err(anyhow::Error::from)
})
.collect::<Result<Vec<_>, _>>()?;
match ids.len() {
0 => Ok(None),
1 => Ok(ids.pop()),
_ => Err(anyhow::anyhow!(
"multiple agents found for canonical path `{agent_path}`"
)),
}
}
fn push_list_threads_query(
builder: &mut QueryBuilder<Sqlite>,
filters: ThreadFilterOptions<'_>,
relation_filter: Option<crate::ThreadRelationFilter>,
limit: usize,
) {
if let Some(crate::ThreadRelationFilter::DescendantsOf(ancestor_thread_id)) = relation_filter {
builder.push(
r#"
WITH RECURSIVE subtree(child_thread_id, parent_thread_id) AS (
SELECT child_thread_id, parent_thread_id
FROM thread_spawn_edges
WHERE parent_thread_id =View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/state/src/runtime/threads.rs:1179 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/ae06c8f54ad08ee7.
Report an issue: GitHub.