Skip to content

fix(source-control): state that ExitWorktree remove spares another running session's worktree - #17939

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-17829-44911745810-1
Nov 21, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-17829-44911745810-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17829

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The worktree skill's ExitWorktree claims named only the path-entered exception to remove; since Claude Code 2.1.330, ExitWorktree and the worktree exit dialog also no longer delete a worktree another running Claude Code session is working in. The verification record row, the SKILL.md Boundary bullet and the native-surfaces store row (with its generated view) now say so and cite changelog item 2.1.330-012, since the worktrees page states only the exit-dialog half, not the tool's. Choice: the docs/native-surfaces.md view was edited by hand to match the store because the lane cannot run overlap.py generate; the render format was checked against overlap.py's render_block, and recheck.verified stays 2026-10-01 because the row's binary claims were not re-read.

Not verified

  • tidy skipped: the change spans more than 1 area (plugins/source-control, docs/native-surfaces, docs), over the tidy cutoff
  • native-overlap registry check (view matches store) and changed-skills code from the checked tree were skipped by check-affected in this lane; the view was checked against overlap.py by reading only, so CI's run of it confirms
  • check-affected skipped comment-hygiene (fetch denied), size-check (script missing) and typos (not installed); left to the PR's CI
  • whether a session that entered through this plugin (which writes its own lock reason, not Claude Code's) counts as 'another running session' for the new exception is unverified; routing is unchanged since the skill never passes remove

Fix

  • plugins/source-control/skills/worktree/reference/native-worktree.md: row 12 adds the 2.1.330 other-session exception, cites changelog item 2.1.330-012 and the clean-up section, adds a 2026-11-21 as-of and a recheck trigger for the tools reference documenting the exception
  • plugins/source-control/skills/worktree/SKILL.md: the ExitWorktree Boundary bullet states the exception with the changelog item cited
  • docs/native-surfaces/records.json: ExitWorktree row reason states the exception and the 2026-11-21 correction, a new evidence entry cites changelog item 2.1.330-012, the recheck trigger covers the exception
  • docs/native-surfaces.md: generated view mirrors the records.json row edit
  • .changes/source-control/work-resolve-issue-issue-17829-44911745810-1-27a41a24.md: patch fragment for source-control

Verification

The runner ran each check from the base copy against 9f0f2c7:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md: the 12th 2.1.330 bullet reads 'Fixed ExitWorktree and the worktree exit dialog deleting a worktree that another running Claude Code session was working in'
  • read https: //code.claude.com/docs/en/worktrees: 'Clean up worktrees' says when Claude Code finds another session in the worktree, the worktree and branch stay even if you choose removal; it does not say this for the ExitWorktree tool
  • check-changelog-fragments: all 9 fragments valid
  • check-changed-skills: worktree PASS, 0 errors, 7 warnings (pre-existing size and structure warnings; body grew 215 -> 217 lines)
  • check-affected: 14 passed, 9 skipped over 5 changed files
  • overlap.py render_block (lines 1096-1119) read: the hand-edited view lines match its output for the edited row
  • fresh-context review subagent over the whole diff: no defects found
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44911745810

Left out: the items under Not verified.

Related

#17829

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44914313544, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44914313544

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 67e85ae638cab1d6249f4a12638197552d8d8f9d: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, blocking only): no security issues found

This review covers only what changed since 9f0f2c78. I read every hunk of all 5 files in the incremental diff. Every change is documentation: it records Claude Code changelog item 2.1.327-131. Since 2.1.327, ExitWorktree with action: "remove" asks before deleting a worktree that may hold unsaved work. In don't-ask mode, or with nobody to answer, the removal is refused unless an allow rule, auto mode or bypass permissions mode allows it.

  • .changes/source-control/…-27a41a24.md: the changelog fragment's text is longer. It is prose only.
  • docs/native-surfaces/records.json and the generated docs/native-surfaces.md: the ExitWorktree record gets a longer reason, a note on the gated false field, one more evidence string and a wider recheck trigger. The verdict, integration and baked fields are unchanged.
  • plugins/source-control/skills/worktree/SKILL.md: the Boundary bullet gains a descriptive sentence. No rule is deleted, narrowed or softened. Routing is unchanged: leave with keep, remove with cleanup, and the skill still never passes remove.
  • plugins/source-control/skills/worktree/reference/native-worktree.md: two verification-record rows gain the removal-ask fact, its citation, as-of dates and recheck triggers.

What I checked:

  • Instruction surfaces: the changes only add descriptive text, so the instruction-exception register lens finds nothing.
  • Trusted paths: none of the changed files matches a TRUSTED PATHS glob.
  • Manifests and trust controls: no plugin manifest, workflow, code file or trust control changed.
  • Prior findings: the one prior post is a summary with no findings, so nothing is repeated.

This review was blocking only, as the prior-findings file says (blocking only: yes).

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 9f0f2c78f5972e5238afac1b401ecbb461436f42; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 67e85ae638cab1d6249f4a12638197552d8d8f9d: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): PR #17939, 9f0f2c7..67e85ae

This lane already reviewed an earlier head of this PR, so this pass reports blocking findings only. It covers the five files the push changed. I read each file's whole change in .claude-lane/incremental.diff.

The push adds the v2.1.327 removal-ask claim (changelog item 2.1.327-131). The MEMBER comment on #17829 added two done-when items for it, and both are now met:

  • Rows 11 and 12 of native-worktree.md:
    • Both rows now state that remove asks before deleting a worktree that may hold unsaved work.
    • Both say when it is refused: in don't-ask mode, or with nobody to answer, unless an allow rule, auto mode or bypass permissions mode allows it.
    • Both cite changelog item 2.1.327-131 and carry a 2026-11-21 As-of.
    • Each recheck trigger fires when the tools-reference ExitWorktree row documents the ask.
  • The SKILL.md Boundary bullet and records.json:
    • The Boundary bullet (SKILL.md:177-179) states the same ask.
    • The records.json row adds an evidence line quoting the item, and its reason and recheck trigger name the ask.
    • The gated false evidence entry now records why it stays as observed.
  • The gated false reason checks out. It says gated comes from an isEnabled availability check. plugins/harness-ops/skills/inventory/scripts/inventory.py:4323 (tools lane) sets rec["gated"] = "isEnabled" in fields, so a permission ask on remove does not change it.
  • The view matches the store. I compared the regenerated docs/native-surfaces.md lines with the records.json edits line by line (reason, both evidence lines, recheck trigger), and they match. I did not run overlap.py; CI's registry check confirms it.
  • The changelog fragment now covers the 2.1.327 ask as well, at the same patch level, which fits a docs correction.

The earlier inline finding on native-worktree.md:12 (the missing 2.1.327 done-when) is resolved by this push. I am not raising it again.

The upstream claims are author-claimed and I did not verify them: the 2.1.327-131 changelog wording, and that the tools reference lists ExitWorktree as needing no permission. I have no network access in this run.

Loosened checks: none in this diff. Loosened checks would be marked: fail (default; the wrapper supplied no loosened_check_verdict: line); patterns: 0 (no loosened_check_patterns: line). There was no loosened_check_decision_record: line either, so I did not check the citation requirement.

Spend: none; this push changes docs and a changelog fragment only.

Verifier dropped 0 of 0 candidates.

Comment thread docs/native-surfaces/records.json Resolved
@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 9f0f2c78f5972e5238afac1b401ecbb461436f42. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which clears when the
  lane runs again

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback

Run 44927482625, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step skipped
Commits pushed none (read lane)
Run 44927482625

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 9f0f2c7.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback

Run 44927482625, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44927482625

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on 9f0f2c7.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the pull request has an unresolved review thread the lane does not take (a reviewer it does not act on, a review of an older head, or a thread it already answered), so no lane resolves it and a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17939 -f activity=address-feedback

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation

Run 44920504809, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44920504809

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 21, 2026
Delivers the done-when items #17829's hub comment folded in from the
v2.1.327 triage (#16982 row 6). Rows 11 and 12 of native-worktree.md, the
SKILL.md Boundary bullet and the records.json ExitWorktree row now state
that `remove` asks before deleting a worktree that may hold unsaved work
and is refused in don't-ask mode or with nobody to answer unless an allow
rule, auto or bypass permissions mode allows it, citing changelog item
2.1.327-131 (read 2026-11-21). The tools-reference ExitWorktree row still
names no ask, so both rows' recheck triggers fire when it does.

records.json keeps `gated false`: inventory.py sets that field from an
`isEnabled` availability check in the tool definition, which a permission
ask on `remove` does not change; the evidence line now says so. The view
in docs/native-surfaces.md was regenerated with overlap.py generate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 3 of max 4 on 67e85ae.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 67e85ae638cab1d6249f4a12638197552d8d8f9d, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=67e85ae638cab1d6249f4a12638197552d8d8f9d rubric=10.4.5 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 9678502 Nov 21, 2026
88 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17829-44911745810-1 branch November 21, 2026 17:30
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 9678502cdfce83e4be7185a5d56d862b69d63d10; later checks count it verified from this comment.

kyle-sexton added a commit that referenced this pull request Nov 21, 2026
claude-review was right: GitHub Actions makes one check suite per
workflow run, so `first: 3` suites filtered only by app paged over on
most commits and sent them back to REST, saving almost nothing. Live on
2026-11-21 the app-only filter truncated 10 of #17880's 59 commits, both
of #17939's and all 5 of #17926's.

The suites now also filter by checkName, so only suites holding the
model run come back (at most 3 per commit on those PRs), at first: 5.
GraphQL returns one suite once per attempt, so runs are deduped by
databaseId. Verified on #17880, #17939 and #17926 (66 commits): 0
truncated, the run ids match REST check-runs per commit exactly, 6
GraphQL points a query.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

source-control: ExitWorktree remove no longer deletes another running session's worktree (2.1.330)

1 participant