{"record":{"id":"7c8374f378fd9221","repo":"openai/codex","slug":"in-process-app-server-shutdown-failed-err","errorCode":null,"errorMessage":"in-process app-server shutdown failed: {err}","messagePattern":"in-process app-server shutdown failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/exec/src/lib.rs","lineNumber":962,"sourceCode":"    info!(\"Codex initialized with event: {session_configured:?}\");\n\n    let (interrupt_tx, mut interrupt_rx) = mpsc::unbounded_channel::<()>();\n    tokio::spawn(async move {\n        if tokio::signal::ctrl_c().await.is_ok() {\n            tracing::debug!(\"Keyboard interrupt\");\n            let _ = interrupt_tx.send(());\n        }\n    });\n\n    let task_id = match initial_operation {\n        InitialOperation::ForkOnly => {\n            request_shutdown(&client, &mut request_ids, &primary_thread_id_for_span)\n                .await\n                .map_err(anyhow::Error::msg)?;\n            client\n                .shutdown()\n                .await\n                .map_err(|err| anyhow::anyhow!(\"in-process app-server shutdown failed: {err}\"))?;\n            event_processor.print_final_output();\n            return Ok(());\n        }\n        InitialOperation::UserTurn {\n            items,\n            output_schema,\n        } => {\n            let response: TurnStartResponse = send_request_with_response(\n                &client,\n                ClientRequest::TurnStart {\n                    request_id: request_ids.next(),\n                    params: TurnStartParams {\n                        thread_id: primary_thread_id_for_span.clone(),\n                        client_user_message_id: None,\n                        input: items.into_iter().map(Into::into).collect(),\n                        responsesapi_client_metadata: None,\n                        additional_context: None,\n                        environments: None,","sourceCodeStart":944,"sourceCodeEnd":980,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec/src/lib.rs#L944-L980","documentation":"Error \"in-process app-server shutdown failed: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/exec/src/lib.rs:962 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Investigate the app-server shutdown failure per the reported error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}