Forked tasks inherit unfinished turns

Open 💬 3 comments Opened Jul 31, 2026 by antoaenono
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using?

Codex App 26.727.40816 (build 6067).

What platform is your computer?

macOS: Darwin 24.6.0 arm64 arm.

What issue are you seeing?

TL;DR: If you fork a task while it is still working, the new task unexpectedly includes that unfinished work instead of starting from completed history only.

Forking an active Codex Desktop task copies its unfinished source turn into the child as an interrupted turn, even though the fork_thread contract states that forks contain completed history only and the active turn and unfinished response are not copied.

ID-targeted follow-up routing remains correct, but the unexpected inherited context means a supposedly clean child contains abandoned survey or implementation instructions.

What steps can reproduce the bug?

  1. Create a projectless parent task and complete one baseline turn.
  2. Start a new parent turn that emits a visible marker and stays active (for example, emit ACTIVE-TURN-MARKER and run a 45-second sleep).
  3. Confirm that the parent is active and its latest turn is in progress.
  4. Fork the parent with the task-management fork operation.
  5. Read the child before sending it a follow-up.

What is the expected behavior?

  • The new task contains only completed history from the original task.
  • The unfinished turn is absent, including its prompt, partial response, and tool activity.
  • The new task can then receive its own follow-up work without carrying abandoned context.

Additional information

The child showed the active source turn as interrupted, including the original prompt and partial response, before it received any new prompt.

A control test confirmed that messages sent to the original and forked tasks still went to the correct task. The problem is not incorrect routing; it is the unfinished turn being copied into the fork.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 27 days ago

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

  • #36074

Powered by Codex Action

antoaenono · 27 days ago

Reproduction trace

I did not attach my local Codex session logs, but the following is the rough structure of two tasks launched to repro.

Parent task, before fork
  completed turn
    BASELINE COMPLETE

  active turn
    prompt: send a marker, then wait
    assistant: ACTIVE TURN MARKER
    status: in progress

Fork created here

Forked task, immediately after fork
  completed turn
    BASELINE COMPLETE

  inherited turn
    prompt: send a marker, then wait
    assistant: ACTIVE TURN MARKER
    status: interrupted
    turn identity: same as parent’s active turn

Parent task, later
  active turn finishes
    ACTIVE TURN FINISHED

The fork did not receive the parent’s final reply. It did contain the prompt and partial assistant output from the active turn.

antoaenono · 27 days ago

Copy to repro...

hah this is my first reproduction instructions as a prompt which orchestrates threads...

Paste the following into a new projectless thread.
It creates and inspects its own parent/fork pair threads.

Run a disposable, projectless reproduction of Codex task forking while a turn is active. Do not touch any repository or project files.

1. Create a projectless parent task. Have it complete a baseline message: BASELINE COMPLETE.
2. Send the parent a second instruction: first emit ACTIVE TURN MARKER, then wait 15 seconds, then reply ACTIVE TURN FINISHED.
3. Confirm the second parent turn is active and the marker has appeared. Fork the parent using a same-directory fork.
4. After the parent finishes, inspect both task histories.
5. Report whether the child contains the active parent turn's prompt and marker, whether it is marked interrupted, and whether it received the final reply.

Do not modify, rename, pin, archive, or delete the created test tasks.