Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: A delegated task's worktree is removed at task end with its uncommitted changes #42619

ClosedKonstantinVasilkov(GitHub profile, opens in a new tab) opened this issue 2 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 (delegated tasks / worktree isolation)

Steps to reproduce

  1. From a parent thread, start a delegate_task to a Codex provider with worktree isolation.
  2. In the brief, tell the child not to commit, which is a common "leave changes for my review" setup.
  3. Let the child edit files and finish normally.

Expected behavior

The child's worktree is kept when it has uncommitted or untracked changes, or T3 Code saves them (a patch or a stash ref) and says where. The parent gets the path in the task result.

Actual behavior

When the task finished, the worktree directory was gone, along with 42 changed files (38 modified, 4 untracked). The child's final message still linked to the deleted worktree path. Nothing was left in git stash, the branch, or T3 state. We rebuilt the work only by replaying the apply_patch calls from the Codex rollout log.

This looks related to #37769 (thread deletion removes worktrees with force: true), but here nobody deleted anything: the cleanup ran on its own when the task ended.

Impact

Major degradation or frequent failure

Version or commit

0.1.12-nightly.20261124.5191

Environment

macOS 27.3, T3 Code desktop (nightly), Codex app-server provider (gpt-6.2-sol), Claude Code parent thread

Logs or stack traces

No removal entry found in desktop.trace.ndjson for the worktree.

  1. @KonstantinVasilkov In Settings > Maintenance > Cleanup > Last run (or the server log, searching for "storage cleanup removed worktree"), is the deleted worktree folder listed as removed, and if so with what reason? Also, was the child or parent thread deleted or archived after the task finished?

  2. juliusmarminge added labelsneeds more info

  3. tanstack-source added labelsbug

  4. Closing: no reply in 7 days after we asked for more information. Comment with the missing details and we will reopen.

  5. juliusmarminge closed this

Sign in to join this conversation.