openai/codex · error
spawned ConPTY is missing its process job
Error message
spawned ConPTY is missing its process job
What it means
Invariant guard after spawning a ConPTY-backed child: the freshly created ConPTY object is expected to always expose its process job object, but the accessor returned None. This indicates the ConPTY structure was not fully initialized by the OS (CreatePseudoConsole/initialization path returned an object without an attached job), an unexpected internal state rather than a caller error.
Solutions
- This is an internal invariant after ConPTY spawn; retry the command and, if it persists, report a bug with the sandbox backend logs.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:87 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/1d19b163303a2547.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:87
let (pi, job, output_join, writer_handle, hpc, conpty_owner, desktop) = if tty {
let (pi, mut conpty) =
spawn_conpty_process_as_user(h_token, command, cwd, env_map, launch_desktop)?;
let job = conpty
.job()
.ok_or_else(|| anyhow::anyhow!("spawned ConPTY is missing its process job"))?;
let hpc = conpty.raw_handle();
let output_join = spawn_output_reader(conpty.take_output_read(), stdout_tx);
let writer_handle = spawn_input_writer(
Some(conpty.take_input_write()),
writer_rx,
/*normalize_newlines*/ true,
);
(pi, job, output_join, writer_handle, hpc, Some(conpty), None)View on GitHub (pinned to 339751715c)