Skip to content

Main turn can complete before collecting required subagent results; results surface only after the next user prompt #40932

Open

Description

@liuyang0508

What version of Codex CLI is running?

OpenAI Codex (v0.149.1)

What subscription do you have?

Pro

Which model were you using?

gpt-5.6-sol (reasoning high, summaries auto)

What platform is your computer?

macOS 15.7.3 (24G419)

What terminal emulator and version are you using (if applicable)?

Ghostty

Codex doctor report

󰀵 liuyang ~   v1.96.0   v3.11.9   01:29  ❯ Codex doctor
Codex Doctor v0.149.1 · macos-aarch64

Notes
   ⚠ rollouts     306 active files · 1.48 GB on disk
   ⚠ updates      update configuration is locally consistent
   ⚠ threads      state DB rows point at missing or unusable rollout files
─────────────────────────────────────────────────────────────

Environment
  ✓ system       zh-Hans-SG
      os                       Mac OS 15.7.3 [64-bit]
      OS language              zh-Hans-SG
      LANG                     en_SG.UTF-8
      VISUAL                   not set
      EDITOR                   not set
  ✓ disk         sufficient free disk space (630.5 GiB)
      warning threshold        5.0 GiB
      failure threshold        1.0 GiB
      CODEX_HOME available     630.5 GiB
      worktree available       630.5 GiB
  ✓ security     no supported endpoint protection detected
      endpoint products        none detected
  ✓ runtime      standalone (unix, package /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin, bin /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/bin, resources /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-resources, path /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-path)
      version                  0.149.1
      install method           standalone (unix, package /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin, bin /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/bin, resources /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-resources, path /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-path)
      commit                   unknown
      executable               ~/.local/bin/Codex
  ✓ install      consistent
      context                  standalone (unix, package /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin, bin /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/bin, resources /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-resources, path /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-path)
      managed by               npm: no · bun: no · pnpm: no · package root —
      PATH entries (2)         ~/.local/bin/codex
                               /opt/homebrew/bin/codex
  ✓ search       file exists (bundled, /Users/liuyang/.codex/packages/standalone/releases/0.149.1-aarch64-apple-darwin/codex-path/rg)
      search command           ~/.codex/packages/standa…le-darwin/codex-path/rg
      search provider          bundled
      search command readiness file exists
  ✓ git          git version 2.50.1 (Apple Git-155)
      selected git             /usr/bin/git
      version                  git version 2.50.1 (Apple Git-155)
      exec path                /Library/Developer/Comma…ls/usr/libexec/git-core
      repo detected            false
      PATH entries (2)         /usr/bin/git
                               /opt/homebrew/bin/git
  ✓ terminal     Ghostty 1.3.1
      terminal                 Ghostty
      TERM_PROGRAM             ghostty
      terminal version         1.3.1
      stdin is terminal        true
      stdout is terminal       true
      stderr is terminal       true
      terminal size            225x53
      color output             enabled
      COLORTERM                truecolor
      TERMINFO                 /Applications/Ghostty.ap…ents/Resources/terminfo (dir)
      effective locale         en_SG.UTF-8
  ✓ title        default · project liuyang
      title source             default
      title items              activity, project-name
      activity item            true
      project source           cwd
      project value            liuyang
  ✓ state        databases healthy
      CODEX_HOME               ~/.codex (dir)
      log dir                  ~/.codex/log (dir)
      sqlite home              ~/.codex (dir)
      state DB                 ~/.codex/state_5.sqlite (file) · integrity ok
      log DB                   ~/.codex/logs_2.sqlite (file) · integrity ok
      goals DB                 ~/.codex/goals_1.sqlite (file) · integrity ok
      memories DB              ~/.codex/memories_1.sqlite (file) · integrity ok
      active rollouts          306 files · 1.48 GB (avg 4.95 MB)
      archived rollouts        0 files · 0 B (avg 0 B)
      queue DB                 ~/.codex/queue_1.sqlite (file)
      queue DB integrity       ok
      thread history DB        ~/.codex/thread_history_1.sqlite (file)
      thread history DB integrity ok
      standalone release cache 13 entries in /Users/liuyang/.codex/packages/standalone/releases
  ⚠ threads      state DB rows point at missing or unusable rollout files
      default model provider   openai
      rollout DB active files  306
      rollout DB archived files 0
      rollout DB scan errors   0
      rollout DB malformed file names 0
      rollout DB scan cap reached false
      rollout DB rows          718
      rollout DB active rows   669
      rollout DB archived rows 49
      rollout DB missing active rows 0
      rollout DB missing archived rows 0
      rollout DB stale rows    412
      rollout DB archive mismatches 0
      rollout DB duplicate rollout thread ids 0
      rollout DB duplicate DB paths 0
      rollout DB model providers openai=718
      rollout DB sources       subagent:thread_spawn=539, vscode=100, cli=76, subagent:other=2, exec=1
      rollout DB stale row sample ~/.codex/archived_sessio…a579-355a52717b96.jsonl
      rollout DB stale row sample ~/.codex/sessions/2026/0…a099-25e886ee13df.jsonl
      rollout DB stale row sample ~/.codex/archived_sessio…86a5-b11e5226f87b.jsonl
      rollout DB stale row sample ~/.codex/archived_sessio…881b-d6d27a2077fd.jsonl
      rollout DB stale row sample ~/.codex/archived_sessio…9080-6c2e6c7c1572.jsonl

Configuration
  ✓ config       loaded
      model                    gpt-5.6-sol · openai
      cwd                      ~
      config.toml              ~/.codex/config.toml
      config.toml parse        ok
      MCP servers              5
      feature flags            42 enabled · 0 overridden (full list with --all)
  ✓ auth         auth is configured
      auth storage mode        File
      auth file                ~/.codex/auth.json
      stored auth mode         chatgpt
      stored API key           false
      stored ChatGPT tokens    true
      stored agent identity    false
  ✓ mcp          5 server (4 stdio, 1 streamable_http) · 1 disabled
      configured servers       5
      disabled servers         1
      stdio servers            4
      streamable_http servers  1
  ✓ sandbox      restricted fs + restricted network · approval OnRequest
      approval policy          OnRequest
      filesystem sandbox       restricted
      network sandbox          restricted
      linux helper             none
      execve wrapper helper    ~/.codex/tmp/arg0/codex-…yQ/codex-execve-wrapper

Desktop App
  ✓ desktop      the desktop application is installed
      version                  26.818.31338
      running                  false
      log directory            $HOME/Library/Logs/com.openai.codex
  ✓ desktop      the desktop application is not running
  ✓ desktop      the desktop application passed available macos security assessments
      gatekeeper               accepted

Updates
  ⚠ updates      update configuration is locally consistent
      startup update check     true
      update action            standalone installer
      version cache            ~/.codex/version.json
      cached latest version    0.149.1
      last checked at          2026-08-26 10:48 UTC
      latest version probe     curl: (56) The requested URL returned error: 403

Connectivity
  ✓ network      network-related environment looks readable
      proxy env vars present   HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY, http_proxy, https_proxy, all_proxy, no_proxy
      system proxy             manual
      respect system proxy     disabled
      managed proxy            not configured
  ✓ websocket    connected (HTTP 101 Switching Protocols) · 15s timeout
      model provider           openai
      provider name            OpenAI
      wire API                 responses
      supports websockets      true
      proxy env vars present   HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY, http_proxy, https_proxy, all_proxy, no_proxy
      connect timeout          15000 ms
      auth mode                chatgpt
      endpoint                 wss://chatgpt.com/backend-api/<redacted>
      DNS                      1 IPv4, 0 IPv6, first IPv4
      handshake result         HTTP 101 Switching Protocols
      reasoning header         false
      server model present     false
  ✓ reachability active provider endpoints are reachable over HTTP
      reachability mode        ChatGPT auth
      ChatGPT inference URL    https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)
      desktop assets CDN       https://chatgpt.com/backend-api/<redacted> reachable (HTTP 200)

Background Server
  ○ app-server   not running (ephemeral mode)
      daemon state dir         ~/.codex/app-server-daemon
      settings                 ~/.codex/app-server-daemon/settings.json (missing)
      pid file                 ~/.codex/app-server-daemon/app-server.pid (missing)
      update-loop pid file     ~/.codex/app-server-daem…/app-server-updater.pid (missing)
      control socket           ~/.codex/app-server-cont…app-server-control.sock
      status                   not running
      mode                     ephemeral

─────────────────────────────────────────────────────────────
20 ok · 1 idle · 3 notes · 2 warn · 0 fail degraded

--summary compact output   --all expand truncated lists
--json redacted report

󰀵 liuyang ~   v1.96.0   v3.11.9   01:41   in 18s78ms ❯

What issue are you seeing?

Summary

In a Codex CLI multi-agent workflow, the main agent emitted final_answer and completed its turn before collecting the results of three required subagents.

The subagents continued working, but their result messages did not reactivate the completed main turn. They were delivered to the main thread only after I sent another user message approximately 32 minutes later.

This appears to be an orchestration/finalization issue rather than a crash or streaming failure.

Environment

  • Codex CLI: 0.149.1
  • Surface: Codex CLI
  • Model: gpt-5.6-sol
  • Reasoning effort: high
  • Service tier: fast
  • Collaboration mode: Default chat, not /goal
  • OS: macOS <macOS 15.7.3>
  • Shell: Fish
  • In-app feedback session ID: <01a03158-b4a8-7c10-9f70-142be548c65e>

Expected behavior

When required subagents are still running or their requested results have not been collected, the main agent should:

  1. Keep the main turn active.
  2. Use commentary for intermediate progress.
  3. Wait for the required subagent results.
  4. Return final_answer only after all required results have been collected, unless the user explicitly asks to detach the work.

The current OpenAI documentation says Codex handles orchestration, including waiting for results, and waits until all requested results are available before returning a consolidated response:

https://learn.chatgpt.com/docs/agent-configuration/subagents

Actual behavior

The main agent:

  1. Checked the agent states.
  2. Observed the main agent and all three subagents as running.
  3. Sent follow-up instructions to the subagents.
  4. Did not call wait_agent.
  5. Emitted final_answer.
  6. Completed the main turn two seconds later.

The final response itself described the delegated tasks as still in progress and promised future progress updates, even though emitting final_answer made those updates impossible without another user prompt.

Event timeline

All timestamps below are UTC.

2026-08-26T15:55:22.247Z  event      task_started
2026-08-26T15:58:31.630Z  assistant  commentary
2026-08-26T15:58:33.342Z  tool       list_agents
2026-08-26T15:58:50.625Z  tool       send_message
2026-08-26T15:59:05.786Z  tool       send_message
2026-08-26T15:59:49.139Z  tool       exec
2026-08-26T15:59:59.361Z  tool       send_message
2026-08-26T16:00:17.344Z  assistant  final_answer
2026-08-26T16:00:19.736Z  event      task_complete

There was no wait_agent call between the last child instruction and final_answer.

There was also no turn_aborted, crash, or missing tool event in this interval.

Agent-state snapshot

The list_agents result at 2026-08-26T15:58:33.555Z showed:

2026-08-26T15:58:33.555Z  main        running
2026-08-26T15:58:33.555Z  subagent_1  running
2026-08-26T15:58:33.555Z  subagent_2  running
2026-08-26T15:58:33.555Z  subagent_3  running

This was the last explicit agent-state check before the main agent finalized. The parent continued sending instructions after this snapshot but did not check again or wait for completion.

Result delivery after the next user prompt

A new turn began at approximately 2026-08-26T16:32:22Z. The pending subagent messages were then delivered to the main thread:

2026-08-26T16:32:22.910Z  event      task_started
2026-08-26T16:32:22.926Z  user       new_prompt
2026-08-26T16:32:41.203Z  assistant  commentary
2026-08-26T16:32:41.636Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.636Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.637Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.637Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.638Z  subagent   result_delivered_to_main

These five agent_message events contained progress/final messages from the three delegated agents.

Impact

  • The UI makes the workflow appear complete even though required work is still running.
  • Promised live progress updates cannot be delivered after the main turn ends.
  • Completed subagent results remain invisible until the user sends another message.
  • Users may incorrectly assume that development stopped or that subagent results were lost.
  • The behavior conflicts with the documented expectation that Codex waits for requested subagent results before returning a consolidated response.

Suggested safeguards

Any of the following would prevent this failure mode:

  1. Block final_answer while required child agents are active or have uncollected results.
  2. Convert an attempted final response into commentary when required work remains.
  3. Show a confirmation such as: “3 subagents are still active. End this turn and detach them?”
  4. Keep the main controller subscribed to required child-result events until completion or explicit cancellation.
  5. Clearly surface detached subagents and automatically display their results when they finish.

The most important invariant would be:

required_active_children > 0 OR uncollected_required_results > 0
→ main turn must not finalize without explicit detach intent

Reproducibility

Observed in one long-running production session. I have not yet reduced it to a clean minimal repository reproduction.

The full session was submitted through Codex feedback so the OpenAI team can inspect the original transcript using the feedback session ID above. I can provide additional redacted logs privately if needed.

What steps can reproduce the bug?

No repository-specific application code is required. The issue occurs in Codex CLI's parent/subagent orchestration.

Observed reproduction

  1. Start Codex CLI in a normal Default chat, not /goal.
  2. Delegate three required, long-running tasks to subagents.
  3. Explicitly tell the main agent to continue until all three tasks complete and to provide progress updates.
  4. While /agent shows the subagents as active, ask the main agent for a status update and tell it to keep working.
  5. The main agent calls list_agents, sends follow-up messages to the workers, but does not call wait_agent.
  6. The main agent emits final_answer, and the main turn becomes task_complete.
  7. The subagents continue working, but their results are not delivered to the completed main turn.
  8. Send another user message. A new turn starts, and the pending subagent results are immediately delivered to the main thread.

Minimal synthetic setup

Run Codex in a temporary directory:

mkdir -p /tmp/codex-subagent-finalization-repro
cd /tmp/codex-subagent-finalization-repro
git init -q
codex

Send this prompt:

Spawn exactly three subagents. Each subagent must run a read-only command that waits 90 seconds and then returns a unique completion token:

subagent 1: sleep 90; printf 'subagent-1-complete\n'
subagent 2: sleep 90; printf 'subagent-2-complete\n'
subagent 3: sleep 90; printf 'subagent-3-complete\n'

All three results are required. Keep the main turn active, use commentary for progress, and do not send a final response until all three completion tokens have been collected.

While /agent shows the three children as active, queue this follow-up:

Why can't I see live progress? Check all agents, keep the main turn active, continue waiting for all required results, and report milestones. Do not stop after this status update.

The failure occurs if the main agent returns a final response and completes the parent turn before collecting all three required results.

The sleep-based example is a synthetic reproduction intended to exercise the same orchestration path. The event trace below comes from the real observed session.

Thread information

  • Thread/session ID: 01a03158-b4a8-7c10-9f70-142be548c65e
  • In-app feedback session ID: <01a03158-b4a8-7c10-9f70-142be548c65e>

Observed trace

2026-08-26T15:55:22.247Z  event      task_started
2026-08-26T15:58:31.630Z  assistant  commentary
2026-08-26T15:58:33.342Z  tool       list_agents
2026-08-26T15:58:50.625Z  tool       send_message
2026-08-26T15:59:05.786Z  tool       send_message
2026-08-26T15:59:49.139Z  tool       exec
2026-08-26T15:59:59.361Z  tool       send_message
2026-08-26T16:00:17.344Z  assistant  final_answer
2026-08-26T16:00:19.736Z  event      task_complete

The last explicit agent-state snapshot before finalization showed:

2026-08-26T15:58:33.555Z  main        running
2026-08-26T15:58:33.555Z  subagent_1  running
2026-08-26T15:58:33.555Z  subagent_2  running
2026-08-26T15:58:33.555Z  subagent_3  running

There was no wait_agent call between the child instructions and final_answer.

What is the expected behavior?

When the main agent has required subagents whose results have not yet been collected, it should keep the main turn active and wait for those results.

Intermediate status updates should use commentary and must not end the turn. The main agent should emit final_answer only after:

  1. All required subagent results have been collected;
  2. The user explicitly cancels the work; or
  3. The user explicitly asks to detach the subagents and return immediately.

If finalization while children remain active is intentionally supported, Codex should display a warning such as:

Three required subagents are still active. End the main turn and detach them?

A completed main turn should not silently prevent later child results from reaching the user.

The documented behavior says Codex handles waiting for subagent results and waits until all requested results are available before returning a consolidated response:

https://learn.chatgpt.com/docs/agent-configuration/subagents

Additional information

Environment

  • Codex CLI: 0.149.1
  • Model: gpt-5.6-sol
  • Reasoning effort: high
  • Service tier: fast
  • Mode: Default chat, not /goal
  • OS: macOS <macOS version>
  • Shell: Fish

Evidence that results were delayed until the next user turn

The original main turn completed at:

2026-08-26T16:00:19.736Z  event  task_complete

Approximately 32 minutes later, a new user turn started. Pending subagent messages were then delivered to the main thread:

2026-08-26T16:32:22.910Z  event      task_started
2026-08-26T16:32:22.926Z  user       new_prompt
2026-08-26T16:32:41.203Z  assistant  commentary
2026-08-26T16:32:41.636Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.636Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.637Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.637Z  subagent   result_delivered_to_main
2026-08-26T16:32:41.638Z  subagent   result_delivered_to_main

These five agent_message events contained progress/final messages from the three delegated agents.

There was no crash, turn_aborted event, approval wait, or missing tool event. This appears to be a finalization/orchestration issue rather than a transport or rendering failure.

### Impact

- The workflow appears complete while required work is still running.
- Promised progress updates cannot be delivered after the main turn ends.
- Completed subagent results remain invisible until the user sends another message.
- Users may assume that work stopped or that results were lost.

### Suggested invariant

required_active_children > 0 OR uncollected_required_results > 0
→ do not finalize the main turn without explicit detach intent

The full session was submitted through Codex's in-app feedback flow.

Feedback session ID: <01a03158-b4a8-7c10-9f70-142be548c65e>

### Additional information



Activity

  1. added
    CLIIssues related to the Codex CLI
    subagentIssues involving subagents or multi-agent features
    on Aug 26, 2026
  2. github-actions commented on Aug 26, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. Dexatron-LLC commented on Oct 4, 2026

    @Dexatron-LLC

    Additional recurring observation from 2026-10-04: required child results stayed unprocessed until another user message, despite explicit instructions to keep the parent active and poll every 60 seconds.

    Environment: Windows-hosted workspace with a Linux/WSL shell, zsh, Default collaboration mode, automatic execution with approval policy never. The locally installed CLI reports codex-cli 0.159.3 (measured after resuming; the exact active frontend/runtime build has not been independently established).

    Observed workflow:

    1. The parent coordinates one required child executor and an external manager. The child completes a short, authorized Git/worktree operation and must return its sealed result before the parent can verify it and release the next test run.
    2. The parent explicitly keeps the task open, uses commentary rather than a final response, and repeatedly calls collaboration.wait_agent with a 30-second timeout between direct inbox checks.
    3. A separate local worker sends a 60-second check-in heartbeat. It records the parent's last known status and clearly marks stale status; it does not perform the parent's result verification or start another model turn.
    4. The child finishes and sends progress plus a final result. The parent does not process them or continue the direct polling loop.
    5. The user sends another message saying polling stopped. The pending child messages become available, the parent verifies the already-finished result, and work resumes.

    Timeline, all America/Chicago (UTC-05:00), 2026-10-04:

    Time Observed event
    09:49:33 Manager confirms the narrow operation window. No further approval is needed to perform those operations.
    09:50:23 Parent acknowledges the confirmation and releases the child.
    09:51:29 Last recorded direct parent inbox/status check. A 30-second wait_agent call follows in the visible transcript.
    09:52:52.453431 Child finishes; all 25 native commands exit 0. It seals its result, reports completion, then stands down awaiting parent verification.
    10:24:18 Manager reports that the parent status has been stale for over 30 minutes and requests a wake-up.
    11:12:12 Independent heartbeat still runs. Its recorded parent-status age is 4,843 seconds, with the last update still 09:51:29.
    11:12:37 After the user's new message, the parent checks the inbox. The queued child completion/progress/final messages surface.
    11:14:46 Parent finishes verification, closes the completed operation window and releases the next test run.

    The completed child result therefore waited about 79 minutes 45 seconds before the parent's resumed inbox check. The parent required user intervention even though the worker and the independent heartbeat remained alive. The user reports that this has happened repeatedly; this comment provides one instrumented recurrence, not a quantified count of prior incidents.

    Important distinction from the original report: in the visible transcript for this recurrence, the parent had issued an active timed wait and had not emitted a normal final response before the stall. I have not inspected a complete runtime lifecycle trace, so I cannot establish whether the host ended/paused the turn, a tool continuation was lost, or another scheduling condition prevented the next activation. The timing and delayed processing are observations; a scheduler or wake-up defect is a hypothesis requiring investigation.

    Expected behavior: while an authorized task has a required uncollected child result, resume the parent on the wait timeout or the child's completion, or visibly disclose that the turn has stopped. A continuing background heartbeat must not be mistaken for a parent that is processing replies. The parent should consume the completed result and continue without another user prompt.

    Related: #46120 and #45206. Private repository contents, credentials, business identifiers, filesystem paths and full session logs are intentionally omitted from this public report.

  4. post1917a commented on Oct 12, 2026

    @post1917a

    Additional reproduction on Windows Codex Desktop, 12 October 2026: a required parent/subagent review workflow remained idle for about 3 hours 27 minutes and resumed only after a user message.

    Sanitized parent-rollout timeline (UTC):

    • 2026-10-11 23:53:43.642: collaboration.wait_agent returned timed_out:false; a reviewer message was delivered.
    • 23:54:12.996: the parent emitted task_complete. Its final response explicitly said the independent review was still ongoing and promised to pass the findings on afterward.
    • No subsequent parent task_started appeared until 2026-10-12 03:21:05.943, when the user asked why work had stopped.
    • 03:21:13.593: list_agents exposed completed reviewers. Five queued inter-agent messages materialized immediately afterward, each preceded by inter_agent_communication_metadata { trigger_turn: false }.

    The results were retained, but the dependent next step was not scheduled. The elapsed time between parent turns was 3:26:52.947. Exact child-completion times were not established in this parent-only trace; the late delivery metadata alone does not prove when the original notification was queued.

    Environment: Windows desktop, PowerShell, native MultiAgentV2 tools, Default collaboration mode. Exact active desktop/runtime build was not collected, so this is not attributed to a particular release.

    This matches this issue's finalization gap and the event-driven continuation request in #46120 / #15723. Please clarify the supported contract when required native children outlive a parent turn. A reliable runtime-owned completion-to-continuation path is needed; adding permanent user instructions to keep calling wait_agent would only mask the lifecycle gap.

    No private prompts, project paths, session IDs, credentials or raw logs are included.

  5. interconnectedMe commented on Oct 15, 2026

    @interconnectedMe

    Additional Linux / VS Code extension evidence, with two related but distinct failure modes.

    1. Parent finalises while required monitoring/work remains

    The coordinator can emit a final response while saying delegated work is still running, ending the active monitoring turn. The user must prompt it again to obtain inspection/continuation. Instructions to keep monitoring have not reliably prevented this.

    All following times are UTC on 2026-10-15, from the native parent rollout:

    Occurrence Observed evidence
    A: unattended coordination interval Parent task_complete at 16:55:55.794, after dispatching a required request to another Codex thread and reporting its response pending. No next parent task_started until a user prompt at 17:48:12.684: 52m16.890s. The relevant earlier one-off timer had been explicitly stopped at 16:37:01; no replacement was armed. This establishes premature finalisation/absent monitoring, not a dropped armed timer. The other thread was separately created, not a native child.
    B: native children explicitly left running Parent spawned three native agents at 17:56:52.958, 17:57:06.098, 17:57:18.295. It emitted task_complete at 17:57:22.918, explicitly reporting that all three were running and promising parent verification. Next parent task_started was triggered by another user message at 17:57:54.748. This is a separate premature-finalisation occurrence; the short interval reflects prompt user intervention, not a claimed long stall.
    C: additional delegated work Parent spawned another required agent at 18:00:36.997, then emitted task_complete at 18:00:50.418 while the audit/rectification work remained running. Next user-triggered parent turn started 18:01:30.953. Again, no long-stall claim is made.

    Relevant native identifiers, supplied intentionally for OpenAI diagnostics:

    • Parent thread/session: 01a13e57-8ccf-7930-bc11-6e06313fe55f.
    • Separate recipient thread for A: 01a13e44-44ad-7613-9de1-6e58e0afe650.
    • A's request turn in recipient: 01a1407d-c2dc-7e20-8bcd-d342eafa4a32.
    • B's parent turn: 01a140b5-6c20-7743-b43e-df658e6c21f2.
    • C's parent turn: 01a140b8-dabc-7472-8366-f1ff5c465af0.

    The user reports repeated occurrences over approximately the last week (8–15 October). The table above contains the instrumented occurrences recovered for this comment, all on 15 October; it is not an independently verified cross-day frequency count. Earlier dated reports without exact source timelines are not being presented as additional proven incidents.

    2. Persistent watchdog does not reliably produce parent inspection

    The user also reports a subtler recurring case: a persistent watchdog is configured to counter premature parent finalisation, but it does not always wake the parent into inspecting agents. Operationally it can still depend on the parent remembering to check/wait on the timer.

    Our local mechanism uses a dedicated functions.exec cell with notify / yield_control, a separate ten-second health receipt, recurring 300-second emissions, and functions.wait on that exact cell. Timer process existence, health, a scheduled emission, delivery to a transcript, a resumed model turn, and an actual inspection are distinct conditions.

    Evidence boundary: the recovered occurrence A does not reproduce failure mode 2: its timer was stopped and not replaced. This comment does not establish that a registered durable wake was dropped, nor whether a completed parent is contractually expected to resume on these notifications. The watchdog-wake problem is user-reported recurrence pending a separately instrumented reproduction.

    Recovery in this same session: cell316 started18:01:44.799, health18:01:54.799. Five scheduled emissions at18:06:54.800,18:11:54.801,18:16:54.803,18:21:54.804,18:26:54.807 were observed with parent inspections while the coordinating turn remained active. This demonstrates the active-turn workaround, not reliable wake-up after a completed turn. The cell was explicitly terminated at the bounded checkpoint.

    Environment and version attribution

    Measured on the reporting workstation on 15 October:

    Component Evidence
    Frontend provenance Native session metadata: originator=codex_vscode, source=vscode. This report is a VS Code extension occurrence, not a claim of a standalone Linux Desktop reproduction.
    Session-reported runtime Native session_meta.cli_version: 0.162.0-alpha.17.2.
    VS Code 1.142.0, commit 6d62b1d5dace93a33b3a6d3eca1317bd5e15bcb1, x64.
    Installed Codex extension openai.chatgpt 26.5901.22334.
    Installed standalone CLI codex-cli 0.160.0; inventory only, not proof it hosted this session.
    Extension-bundled executable queried now codex-cli 0.153.0; differs from session metadata. Exact active executable/build attribution therefore remains unresolved; please do not conflate these three version values.
    Parent model / mode Native turn context: gpt-6.1-sol, reasoning low, Default collaboration mode; native agents also used explicit separate model/effort assignments.
    OS / kernel Ubuntu 26.04.1 LTS, Linux 7.0.0-38-generic, x86_64.
    CPU / memory AMD Ryzen9 7900X,12cores/24threads; free reports122GiB total RAM and63GiB swap.
    GPUs AMD Radeon AI PRO R9700; Radeon Pro W7500; integrated AMD Raphael graphics. No evidence implicates GPU hardware in this orchestration failure.

    No credentials, repository contents, business identifiers or raw private transcripts are included.

    Expected contract / request

    Please distinguish prevention of premature parent finalisation from guaranteed event/timer-to-parent continuation. When required child work or an explicitly registered monitoring obligation remains, either keep the parent runnable, resume it on the supported completion/deadline event, or visibly disclose that monitoring has stopped. A heartbeat alone must not be represented as continuing parent inspection.

    It would help to document which native completion/timer mechanism actually starts a new parent turn after task_complete, including persistence across compaction/reconnect, cancellation and deduplication. Local instructions to keep calling a wait tool mitigate the issue but still depend on the same agent whose monitoring failed.

    Related: #15723, #46120, #32188. This is evidence for the finalisation gap plus a separately qualified watchdog-wake report, not a claim of a proven shared scheduler root cause.

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

    CLIIssues related to the Codex CLIbugSomething isn't workingsubagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions