Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

source-control: worktree cleanup Step 4a stops processes before the 4b guards decide the worktree is kept

Open Beginner friendly
#7,312 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
shell
Domain
tooling

Research direction

Read context/cleanup.md and trace the cleanup steps and their keep/remove guards. Confirm the order of the guards, Step 4a, Workspace down, reap, and removal; the issue is done when a kept worktree has no process-stopping side effects and removal candidates follow the expected order.

Written by the indexing model from the issue text.

Description

agent-ready priority: high work-class: scoped

Problem

context/cleanup.md orders Step 4 as 4a (release OS file locks: stop build servers, worktree-rooted daemons and MCP servers) → 4b (guards: stranded work, claim/stale-lock proof) → reap → remove. So a candidate's processes are stopped before the guards decide whether it is removed at all. When a guard then keeps the worktree, its live processes are already dead.

Observed

Cross-repo cleanup of 82 candidates (WSL2, source-control 1.0.3). Candidate melodic-software-claude-code-plugins-feat-interview-web-view-review was locked by a live lane; worktree-claim.sh stale exited 1 (transcript active within 120 min), so the row was correctly kept. But Step 4a had already sent SIGTERM to that worktree's planning surface server (plugins/planning/surface/server). The owning session lost its running server with no notice.

Expected

Run every keep/remove guard first (Work verdict, dirty check, lock and worktree-claim.sh stale proof, .worktreeinclude carried-file check), and only on a row that will be removed run 4a, then the Workspace down, reap, and removal. Reorder to: guards → 4a → down → reap → remove. A row any guard keeps must have no side effects.

Related: #6007 / #6363 (reap rewrites tracked .claude/settings.json, blocking plain removal; also hit 11 times in this run) and #7308 (cross-repo cleanup).

https://claude.ai/code/session_011er7DGtQLNer16uosSwSwA

Dominant language
Shell
Stars
22
Forks
2
Avg merge
8h 24m
Merged PRs (30d)
947

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from melodic-software/claude-code-plugins

All issues in melodic-software/claude-code-plugins

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.