Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Deleting a thread leaves its subagent threads live #39199

Closedpalermo-git(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Start a Codex turn that spawns subagents, so the thread has subagent threads.
  2. Delete the parent thread.
  3. 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.

  1. tanstack-source added labelsbug

  2. juliusmarminge closed this

Sign in to join this conversation.