openai/codex · error

spawned ConPTY is missing its process job

Error message

spawned ConPTY is missing its process job

What it means

Error "spawned ConPTY is missing its process job" thrown in openai/codex.

Source

Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:87

    tty: bool,
    stdin_open: bool,
    stdout_tx: broadcast::Sender<Vec<u8>>,
    stderr_tx: Option<broadcast::Sender<Vec<u8>>>,
    writer_rx: mpsc::Receiver<Vec<u8>>,
    logs_base_dir: Option<&Path>,
) -> Result<LegacyProcessHandles> {
    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,
            use_private_desktop,
            logs_base_dir,
        )?;
        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)
    } else {
        let pipe_handles = spawn_process_with_pipes(
            h_token,
            command,
            cwd,
            env_map,
            if stdin_open {
                StdinMode::Open
            } else {
                StdinMode::Closed

View on GitHub (pinned to 339751715c)

Solutions

  1. This is an internal invariant after ConPTY spawn; retry the command and, if it persists, report a bug with the sandbox backend logs.

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.