{"record":{"id":"d6e0bd91d44db228","repo":"BloopAI/vibe-kanban","slug":"request-id-called-for-unsupported-request-variant","errorCode":null,"errorMessage":"request_id called for unsupported request variant","messagePattern":"request_id called for unsupported request variant","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/executors/src/executors/codex/client.rs","lineNumber":978,"sourceCode":"        answers: codex_answers,\n    }\n}\n\nfn request_id(request: &ClientRequest) -> RequestId {\n    match request {\n        ClientRequest::Initialize { request_id, .. }\n        | ClientRequest::ThreadStart { request_id, .. }\n        | ClientRequest::ThreadFork { request_id, .. }\n        | ClientRequest::TurnStart { request_id, .. }\n        | ClientRequest::GetAccount { request_id, .. }\n        | ClientRequest::ReviewStart { request_id, .. }\n        | ClientRequest::McpServerStatusList { request_id, .. }\n        | ClientRequest::ThreadCompactStart { request_id, .. }\n        | ClientRequest::ThreadRead { request_id, .. }\n        | ClientRequest::ConfigRead { request_id, .. }\n        | ClientRequest::ConfigBatchWrite { request_id, .. }\n        | ClientRequest::GetAccountRateLimits { request_id, .. } => request_id.clone(),\n        _ => unreachable!(\"request_id called for unsupported request variant\"),\n    }\n}\n\n#[derive(Clone)]\npub struct LogWriter {\n    writer: Arc<Mutex<BufWriter<Box<dyn AsyncWrite + Send + Unpin>>>>,\n}\n\nimpl LogWriter {\n    pub fn new(writer: impl AsyncWrite + Send + Unpin + 'static) -> Self {\n        Self {\n            writer: Arc::new(Mutex::new(BufWriter::new(Box::new(writer)))),\n        }\n    }\n\n    pub async fn log_raw(&self, raw: &str) -> Result<(), ExecutorError> {\n        let mut guard = self.writer.lock().await;\n        guard","sourceCodeStart":960,"sourceCodeEnd":996,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/executors/src/executors/codex/client.rs#L960-L996","documentation":"The codex AppServerClient's request_id helper extracts the request id from a ClientRequest via a match. The listed variants all carry a request_id; the catch-all arm hits `unreachable!(\"request_id called for unsupported request variant\")`. This panic means the function was called with a ClientRequest variant that has no request_id field (e.g. notifications or fire-and-forget requests), which its callers (send_request, spawn_turn_start) should never construct.","triggerScenarios":"Calling request_id() with a ClientRequest variant not in the explicit match list — e.g. a variant added in a newer codex-app-server-protocol version, or a notification-style variant that carries no request_id.","commonSituations":"Upgrading the codex protocol crate adds new ClientRequest variants while request_id's match isn't updated; a refactor routes a new request type through send_request without teaching request_id about it.","solutions":["Identify the offending variant from the panic backtrace and add it to the match arm list in request_id (if it carries a request_id).","If the variant legitimately has no request id, do not route it through send_request; handle it as a notification.","Pin/adjust the codex-app-server-protocol dependency so variants match the code, then update the match for any new versions."],"exampleFix":"// before\n_ => unreachable!(\"request_id called for unsupported request variant\"),\n// after\nClientRequest::NewVariant { request_id, .. } => request_id.clone(),\n_ => unreachable!(\"request_id called for unsupported request variant\"),","handlingStrategy":"type-guard","validationCode":"// Only call for request variants known to carry request_id\nfn has_request_id(req: &ClientRequest) -> bool {\n  matches!(req, ClientRequest::ThreadRead {..} | ClientRequest::ConfigRead {..} /* ... */)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Update request_id's match arms whenever ClientRequest gains new variants","Never route notification-style (no request_id) variants through send_request","Pin the codex-app-server-protocol version and audit variants on upgrades"],"tags":["rust","panic","enum-match","protocol"],"backgroundTag":"unhandled-enum-variant","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}