{"record":{"id":"1d19b163303a2547","repo":"openai/codex","slug":"spawned-conpty-is-missing-its-process-job","errorCode":null,"errorMessage":"spawned ConPTY is missing its process job","messagePattern":"spawned ConPTY is missing its process job","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs","lineNumber":87,"sourceCode":"    tty: bool,\n    stdin_open: bool,\n    stdout_tx: broadcast::Sender<Vec<u8>>,\n    stderr_tx: Option<broadcast::Sender<Vec<u8>>>,\n    writer_rx: mpsc::Receiver<Vec<u8>>,\n    logs_base_dir: Option<&Path>,\n) -> Result<LegacyProcessHandles> {\n    let (pi, job, output_join, writer_handle, hpc, conpty_owner, desktop) = if tty {\n        let (pi, mut conpty) = spawn_conpty_process_as_user(\n            h_token,\n            command,\n            cwd,\n            env_map,\n            use_private_desktop,\n            logs_base_dir,\n        )?;\n        let job = conpty\n            .job()\n            .ok_or_else(|| anyhow::anyhow!(\"spawned ConPTY is missing its process job\"))?;\n        let hpc = conpty.raw_handle();\n        let output_join = spawn_output_reader(conpty.take_output_read(), stdout_tx);\n        let writer_handle = spawn_input_writer(\n            Some(conpty.take_input_write()),\n            writer_rx,\n            /*normalize_newlines*/ true,\n        );\n        (pi, job, output_join, writer_handle, hpc, Some(conpty), None)\n    } else {\n        let pipe_handles = spawn_process_with_pipes(\n            h_token,\n            command,\n            cwd,\n            env_map,\n            if stdin_open {\n                StdinMode::Open\n            } else {\n                StdinMode::Closed","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs#L69-L105","documentation":"Error \"spawned ConPTY is missing its process job\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant after ConPTY spawn; retry the command and, if it persists, report a bug with the sandbox backend logs."],"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"}