{"record":{"id":"69f497e8226884e2","repo":"openai/codex","slug":"unsupported-operation-0","errorCode":null,"errorMessage":"unsupported operation: {0}","messagePattern":"unsupported operation: (.+?)","errorType":"exception","errorClass":"CodexErr","httpStatus":null,"severity":"error","filePath":"codex-rs/protocol/src/error.rs","lineNumber":160,"sourceCode":"    QuotaExceeded,\n    #[error(\n        \"To use Codex with your ChatGPT plan, upgrade to Plus: https://chatgpt.com/explore/plus.\"\n    )]\n    UsageNotIncluded,\n    #[error(\"We're currently experiencing high demand, which may cause temporary errors.\")]\n    InternalServerError,\n    /// Retry limit exceeded.\n    #[error(\"{0}\")]\n    RetryLimit(RetryLimitReachedError),\n    /// Agent loop died unexpectedly\n    #[error(\"internal error; agent loop died unexpectedly\")]\n    InternalAgentDied,\n    /// Sandbox error\n    #[error(\"sandbox error: {0}\")]\n    Sandbox(#[from] SandboxErr),\n    #[error(\"codex-linux-sandbox was required but not provided\")]\n    LandlockSandboxExecutableNotProvided,\n    #[error(\"unsupported operation: {0}\")]\n    UnsupportedOperation(String),\n    #[error(\"{0}\")]\n    RefreshTokenFailed(RefreshTokenFailedError),\n    #[error(\"Fatal error: {0}\")]\n    Fatal(String),\n    // -----------------------------------------------------------------\n    // Automatic conversions for common external error types\n    // -----------------------------------------------------------------\n    #[error(transparent)]\n    Io(#[from] io::Error),\n    #[error(transparent)]\n    Json(#[from] serde_json::Error),\n    #[cfg(target_os = \"linux\")]\n    #[error(transparent)]\n    LandlockRuleset(#[from] landlock::RulesetError),\n    #[cfg(target_os = \"linux\")]\n    #[error(transparent)]\n    LandlockPathFd(#[from] landlock::PathFdError),","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/protocol/src/error.rs#L142-L178","documentation":"Variant CodexErrorDetails::UnsupportedOperation(String) in codex-rs/protocol/src/error.rs:160 rejects an operation the current Codex build, configuration, or executor cannot perform; the payload names the operation. It is non-retryable (is_retryable returns false, error.rs:377) and maps to CodexErrorInfo::BadRequest at the protocol boundary (error.rs:450-452), so treat it as a contract error, not a transient fault.","triggerScenarios":"Calling a core/app-server/protocol API for an operation unavailable in the current setup: gated behind a disabled feature flag, missing on this platform or sandbox mode, or present only in a newer protocol version than the running components. Constructed via CodexErr::UnsupportedOperation(message) (error.rs:333) and delivered in an ErrorEvent with codex_error_info = BadRequest.","commonSituations":"Version skew between client crates, app-server, and TUI; experimental features turned off in config.toml; platform-specific behavior differences (macOS Seatbelt vs Linux landlock); MCP or tool configurations requesting an operation the active sandbox policy refuses.","solutions":["Read the String payload after 'unsupported operation:' - it names exactly which operation was refused.","Check that all components run compatible versions (update the codex crates, app-server, and TUI together) so the operation exists.","Enable the feature flag or configuration key the operation requires.","If the operation is genuinely unsupported here, branch to an alternative API instead of retrying - is_retryable is false.","If it should be supported, capture the payload and report it via /feedback or a GitHub issue."],"exampleFix":"// before: retrying any failure\nif run_op(&mut codex).await.is_err() {\n    schedule_retry().await; // wrong: never becomes retryable\n}\n\n// after: branch on the variant and stop retrying\nmatch err.details() {\n    CodexErrorDetails::UnsupportedOperation(op) => {\n        tracing::warn!(\"operation unsupported here: {op}\");\n        fallback_path().await?;\n    }\n    _ => return Err(err.into()),\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_unsupported_operation(err: &CodexErr) -> bool {\n    matches!(err.details(), CodexErrorDetails::UnsupportedOperation(_))\n}","tryCatchPattern":"match result {\n    Ok(value) => { /* ... */ }\n    Err(err) if matches!(err.details(), CodexErrorDetails::UnsupportedOperation(_)) => {\n        // do not retry; surface to the user or take a fallback path\n    }\n    Err(err) => return Err(err),\n}","preventionTips":["Check protocol version or capability negotiation before calling newer operations.","Keep client and server components on the same release.","Gate experimental operations behind config checks in your wrapper."],"tags":["rust","codex","protocol","bad-request","unsupported-feature"],"backgroundTag":"unsupported-operation","analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}