Before submitting#
Area#
apps/server (delegated tasks / worktree isolation)
Steps to reproduce#
- From a parent thread, start a
delegate_task to a Codex provider with worktree isolation.
- In the brief, tell the child not to commit, which is a common "leave changes for my review" setup.
- 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.
@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?