openai/codex · error · OpenAiFileError

OpenAI file upload for `{file_id}` is not ready yet

Error message

OpenAI file upload for `{file_id}` is not ready yet

What it means

Error "OpenAI file upload for `{file_id}` is not ready yet" thrown in openai/codex.

Source

Thrown at codex-rs/codex-api/src/files.rs:91

        host: String,
        status: StatusCode,
        azure_client_request_id: String,
        azure_request_id: String,
        azure_error_code: String,
    },
    #[error("OpenAI file request to {url} failed with status {status}: {body}")]
    UnexpectedStatus {
        url: String,
        status: StatusCode,
        body: String,
    },
    #[error("failed to parse OpenAI file response from {url}: {source}")]
    Decode {
        url: String,
        #[source]
        source: serde_json::Error,
    },
    #[error("OpenAI file upload for `{file_id}` is not ready yet")]
    UploadNotReady { file_id: String },
    #[error("OpenAI file upload for `{file_id}` failed: {message}")]
    UploadFailed { file_id: String, message: String },
}

#[derive(Deserialize)]
struct CreateFileResponse {
    file_id: String,
    upload_url: String,
    #[serde(default)]
    pdf_c2pa_reservation: bool,
}

#[derive(Deserialize)]
#[serde(rename_all = "snake_case")]
struct DownloadLinkResponse {
    status: String,
    download_url: Option<String>,

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/codex-api/src/files.rs:91 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/25ea6bab4da70b6c. Report an issue: GitHub.