openai/codex · error · ThreadStoreError

invalid thread-store request

Error message

invalid thread-store request: {message}

What it means

ThreadStoreError::InvalidRequest: a generic sentinel variant used by thread-store implementations to reject caller-supplied request data that violates the API contract (bad enum combinations, malformed filters, out-of-range limits). The specific violation is carried in the message field; the faulty input is the request payload itself, not store state.

Solutions

  1. Read the embedded message to identify which request field was rejected and fix the caller's payload
  2. Validate request parameters against the app-server thread API schema before sending
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/thread-store/src/error.rs:29 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/5d4a4f80853f6af4. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/thread-store/src/error.rs:29

        return Err(ThreadStoreError::Unsupported {
            operation: "paginated_threads",
        });
    }
    Ok(())
}

/// Error type shared by thread-store implementations.
#[derive(Debug, thiserror::Error)]
pub enum ThreadStoreError {
    /// The requested thread does not exist in this store.
    #[error("thread {thread_id} not found")]
    ThreadNotFound {
        /// Thread id requested by the caller.
        thread_id: ThreadId,
    },

    /// The caller supplied invalid request data.
    #[error("invalid thread-store request: {message}")]
    InvalidRequest {
        /// User-facing explanation of the invalid request.
        message: String,
    },

    /// The operation conflicted with current store state.
    #[error("thread-store conflict: {message}")]
    Conflict {
        /// User-facing explanation of the conflict.
        message: String,
    },

    /// The store implementation does not support this operation yet.
    #[error("thread-store unsupported operation: {operation}")]
    Unsupported {
        /// Stable operation name for callers that need to map unsupported operations.
        operation: &'static str,
    },

View on GitHub (pinned to 339751715c)