codex - ✅(Solved) Fix Archiving a thread does not archive spawned child threads [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17867Fetched 2026-04-15 06:27:07
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2unlabeled ×1

PR fix notes

PR #18112: feat: cascade thread archive

Description (problem / solution / changelog)

Cascade the thread archive endpoint to all the sub-agents in the agent tree

Fix: https://github.com/openai/codex/issues/17867

Changed files

  • codex-rs/app-server/README.md (modified, +2/-2)
  • codex-rs/app-server/src/codex_message_processor.rs (modified, +106/-14)
  • codex-rs/app-server/tests/suite/v2/thread_archive.rs (modified, +310/-0)
  • codex-rs/state/src/runtime/threads.rs (modified, +17/-0)
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.409.20454

What subscription do you have?

Pro 20x(10x)

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Archiving a main thread does not archive the spawned child/sub-agent threads associated with it.

I archived parent thread 019d6f6f-c048-7283-8871-ef0a87e778ea. The parent thread is marked archived, but its spawned descendants remain live. In local Codex state, that parent has 177 child threads in thread_spawn_edges, and all 177 children still have threads.archived = 0.

Many of those child threads inherit the same original generated title, which leaves a large amount of clutter in the thread list and makes the archive feel incomplete.

What steps can reproduce the bug?

  1. Start a thread that uses spawned child/sub-agent threads.
  2. Let the child threads complete so they are closed but still present in local state.
  3. Archive the parent thread from the Codex app.
  4. Inspect the archive/live state afterward.

Observed result:

  • the parent thread is archived
  • the child threads remain unarchived/live
  • descendant rollout/session state is still left behind

What is the expected behavior?

Archiving a parent thread should either:

  1. recursively archive its spawned descendants by default, or
  2. prompt the user to also archive the spawned child threads.

At minimum, the UI should make it clear that descendant threads remain live after archiving the parent.

Additional information

Example parent thread:

  • 019d6f6f-c048-7283-8871-ef0a87e778ea

Local evidence:

  • 177 descendants recorded in thread_spawn_edges
  • all 177 descendants still had threads.archived = 0
  • many descendant threads inherited the same original generated title as the parent

I can provide descendant thread IDs if useful.

extent analysis

TL;DR

Archiving a parent thread should be modified to either recursively archive its spawned descendants or prompt the user to also archive the child threads.

Guidance

  • Review the archiving logic in the Codex App to ensure it handles spawned child/sub-agent threads associated with the parent thread.
  • Verify the thread_spawn_edges data structure to confirm the relationship between the parent and child threads.
  • Consider adding a prompt or warning to the UI when archiving a parent thread to inform the user about the live descendant threads.
  • Investigate the possibility of recursively archiving descendant threads by default, or provide an option for the user to choose this behavior.

Example

No code snippet is provided as the issue does not contain specific code references.

Notes

The issue seems to be related to the archiving functionality in the Codex App, specifically with regards to handling spawned child threads. The provided information suggests a potential gap in the archiving logic.

Recommendation

Apply a workaround by modifying the archiving logic to either recursively archive descendant threads or prompt the user to also archive the child threads, as this will address the current inconsistency in the archiving behavior.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING