openai/codex · error · ReadinessError

FlagAlreadyReady

FlagAlreadyReady

Error message

Flag is already ready. Impossible to subscribe

What it means

Error "Flag is already ready. Impossible to subscribe" thrown in openai/codex.

Source

Thrown at codex-rs/utils/readiness/src/lib.rs:196

            return;
        }
        // Await changes until true is observed.
        while rx.changed().await.is_ok() {
            if *rx.borrow() {
                break;
            }
        }
    }
}

mod errors {
    use thiserror::Error;

    #[derive(Debug, Error)]
    pub enum ReadinessError {
        #[error("Failed to acquire readiness token lock")]
        TokenLockFailed,
        #[error("Flag is already ready. Impossible to subscribe")]
        FlagAlreadyReady,
    }
}

#[cfg(test)]
mod tests {
    use std::sync::Arc;
    use std::sync::atomic::Ordering;

    use super::Readiness;
    use super::ReadinessFlag;
    use super::Token;
    use super::errors::ReadinessError;
    use assert_matches::assert_matches;

    #[tokio::test]
    async fn subscribe_and_mark_ready_roundtrip() -> Result<(), ReadinessError> {
        let flag = ReadinessFlag::new();

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/utils/readiness/src/lib.rs:196 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/e80bc69c0b862604. Report an issue: GitHub.