openai/codex · error · anyhow::Error

invalid project cursor: {cursor}

Error message

invalid project cursor: {cursor}

What it means

Error "invalid project cursor: {cursor}" thrown in openai/codex.

Source

Thrown at codex-rs/state/src/runtime/projects.rs:487

    let mut parts = cursor.split('|');
    let position_component = parts.next().ok_or_else(|| invalid_project_cursor(cursor))?;
    let position: i64 = position_component
        .parse()
        .map_err(|_| invalid_project_cursor(cursor))?;
    let id = parts.next().ok_or_else(|| invalid_project_cursor(cursor))?;
    let uuid = Uuid::parse_str(id).map_err(|_| invalid_project_cursor(cursor))?;
    if parts.next().is_some()
        || position < 0
        || position.to_string() != position_component
        || uuid.to_string() != id
    {
        return Err(invalid_project_cursor(cursor));
    }
    Ok((position, id.to_string()))
}

fn invalid_project_cursor(cursor: &str) -> anyhow::Error {
    anyhow::anyhow!("invalid project cursor: {cursor}")
}

#[cfg(test)]
#[path = "projects_tests.rs"]
mod tests;

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/state/src/runtime/projects.rs:487 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/881b81ea923c5817. Report an issue: GitHub.