Skip to content

Storage cleanup: orphaned worktree folders are reported as failed every sweep #676

Open

Description

@lastobelus

Symptom

Some worktree folders remain after their .git file disappears or their Git worktree registration is pruned. Cleanup's readLink probe on .git throws NotFound and reports a failed decision on every sweep. Others repeatedly report Repository and project mapping changed. For example: <worktrees>/<repo>/t3code-xxxxxxxx.

One machine reported 13 missing .git failures and 15 mapping changes in one sweep; another reported 1 and 2, respectively. The affected folders were addressed manually; on the first machine, two remain in place because one has an active thread and another is in use by a process.

Request

If these accumulate again, investigate what removes .git or prunes the registration while leaving the folder. Possible causes include tooling running git worktree prune, interrupted removals, or saved-workspace restores. Make cleanup classify orphaned folders instead of failing.

Activity

  1. added 2 commits that reference this issue on Nov 10, 2026
    098f457
    7f98915
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions