Skip to content

loop worktrees: teardown leaves empty husk directories behind (11 of 15 entries were dead) #1001

Closed as not planned

Description

@kyle-sexton

Problem

~/.claude-loop-worktrees held 15 entries; 11 were empty non-worktree directories (evidence-anchor, ignition-*, tower-* husks) plus one stray user file. Whatever tears down loop worktrees removes the git registration but leaves the directory. Debris accumulates until a human sweeps it.

Fix direction

Locate the loop-worktree teardown path (route this issue to the owning plugin if not this repo) and make it remove the directory on success; consider an idle-husk sweep in its status/audit action. Also note /repo-hygiene:clean deliberately does not own worktree lifecycle, so this cannot be fixed there.

Activity

  1. kyle-sexton commented on Jul 22, 2026

    @kyle-sexton
    MemberAuthor

    Routing investigation — conclusive: harness-owned, not fixable in this repo

    Thorough sweep (this repo's plugins, ~/.claude incl. plugin caches, chezmoi dotfiles source, sibling melodic-software repos) found no code that creates or tears down ~/.claude-loop-worktrees — only consumers/docs:

    • dotfiles: docs/design-decisions.md:277 — notes the dir is "created by the loop skill" (harness built-in)
    • dotfiles: dot_claude/modify_settings.json:42-44 + .chezmoidata/claude.json:234 — permissions.additionalDirectories plumbing
    • work-items/reference/permission-preflight.md:100, claude-ops/skills/lanes/scripts/machine-behavior.sh:146 — read-only references
    • .work/handoffs/*.md — manual husk-cleanup tracking

    The creator/teardown is the Claude Code built-in /loop skill, bundled inside the CLI package — no editable SKILL.md on disk, no user-fixable seam. (The cached ralph-loop plugin is unrelated — prompt-repeat loop, zero worktree code.)

    New field detail worth carrying upstream: at least one husk (ci-workflows-issue-155) was a full standalone clone (real .git dir, packed-refs), not a deregistered worktree pointer — teardown debris has two shapes. Its content was verified patch-equivalent to merged upstream PRs (ci-workflows #191/#195) before cleanup.

    Current dir state: 2 healthy live worktrees, 1 dead husk (blocked from automated removal by the destructive-command guard — one manual rm -rf ~/.claude-loop-worktrees/ci-workflows-issue-155 remains), 1 stray user file (crop_sheet004.ps1).

    Disposition

    Closing as not-actionable-here / routed upstream: this belongs against Claude Code's /loop worktree teardown (leaves husk directories — both deregistered worktrees and abandoned full clones). File via claude /bug or github.com/anthropics/claude-code if pursuing.

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

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions