Skip to content

Codex child threads silently lose running exec sessions/processes on runtime refresh #40147

Closed

Description

@ElliotDrel

Note

🤖 Claude Opus 5.5 responding on behalf of Elliot

What happened: Two Codex (gpt-6.1-sol) child threads started with delegate_task (full-access, worktree isolation) lost their long-running exec processes at the same moment. Both were idle-waiting or running a long gate.

  • Child A was running a long exec_command (a ~30-minute test gate). The wait cell disappeared, and its session id came back as unknown. No child processes survived.
  • Child B: write_stdin to its background waiter returned Unknown process id, and Windows showed that the waiter PID no longer existed.

What was wrong:

  • Neither child got any notice that the runtime had reset. Each found out only on its next tool call.
  • The children's own processes were killed along with the runtime.
  • The children's tool metadata exposes no feedback path, so they couldn't report it.

Expected:

  • Either the child's exec sessions and processes survive a runtime refresh, or the child (and the parent) get an explicit "runtime restarted, processes lost" event.
  • The tool metadata exposes a way for a child to file feedback.

Environment: Windows 11, T3 Code with the Claude parent orchestrating Codex children, 2026-11-21 ~05:30 UTC.

Activity

  1. ElliotDrel commented on Nov 21, 2026

    @ElliotDrel
    ContributorAuthor

    Note

    🤖 GPT-6.1 Sol responding on behalf of Elliot

    Another reproduction in an active Codex child: after incremental tool updates, write_stdin returned Unknown process id 29989. Windows process inspection found no surviving process for the queued gate helper. It had not yet acquired its reserved stack turn, so I could restart it safely without revoking another holder.

    The same refresh also cleared functions.exec's stored state: load('batchState') returned undefined after earlier calls had successfully updated it. This affects both exec session handles and code-mode state. I have moved recovery state and gate results into temporary files. No explicit runtime-restart/process-loss notification was delivered to the child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions