Before submitting#
Area#
apps/server
Steps to reproduce#
- Start a Codex turn that spawns subagents, so the thread has subagent threads.
- Delete the parent thread.
- Read the shell snapshot, or look at
orchestration_v2_projection_threads for rows whose lineage names the deleted thread with relationshipToParent: "subagent".
Expected behavior#
Deleting a thread deletes its subagent threads too, as it already deletes its side chats and as deleting a project deletes all of its threads. A subagent's unfinished run is cancelled.
Actual behavior#
The subagent threads stay live, with their full history, so the purge in #32378 never reaches them. An unfinished subagent run, such as one still starting, is not cancelled, although its result can no longer reach the deleted parent. On my install, 8 subagent threads were still live under deleted parents.
There is also a race: Codex reports a subagent's thread before the parent's subagent record, so a delete that reads the parent's subagent records can miss a child that is already there, and a child reported after the delete is created live.
#23900, #30363 and #30370 each work around these leftover children. #33884 is the same gap for archive.
Impact#
Minor bug or occasional failure
Version or commit#
T3 Code 0.1.10; still present on main @ a1e7ac2b24
Environment#
macOS desktop app, Codex provider
Logs or stack traces#
No response
Screenshots, recordings, or supporting files#
No response
Workaround#
None that keeps the project. Deleting the whole project removes them.