Skip to content

fix(session-flow): continue-in-background gate reads worktree.bgIsolation - #8097

Merged
kyle-sexton merged 9 commits into
mainfrom
work-resolve-issue/issue-7288-39105802462-1
Oct 20, 2026
Merged

kyle-sexton merged 9 commits into
mainfrom
work-resolve-issue/issue-7288-39105802462-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #7288

Summary

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

The dirty-tree gate in /session-flow:continue-in-background now reads the effective worktree.bgIsolation from the settings files (managed, local, project, user) before refusing on uncommitted changes. With none it launches and the launch report must say the background session edits this checkout in place, alongside the user. The --settings tier is stated as not covered.

Not verified

  • The settings-precedence order (managed, --settings, local, project, user) comes from the recorded decision's independent check of the settings page; this run did not re-read the settings page.
  • Eval runs and the new-changelog-fragment script (HEAD was detached, so the fragment was written by hand and validated by check-changelog-fragments).

Fix

  • plugins/session-flow/skills/continue-in-background/SKILL.md: gate reads worktree.bgIsolation, launches with a shared-checkout warning on none, notes --settings is not covered, cloud variant unaffected, checklist updated
  • .changes/session-flow/fix-continue-in-background-bgisolation-7288a1c4.md: patch changelog fragment

Verification

The run reports:

  • read https: //code.claude.com/docs/en/agent-view: worktree.bgIsolation "none" makes background sessions edit the working copy directly without moving into a worktree
  • check-changelog-fragments: all 143 fragments valid
  • check-skill plugins/session-flow/skills: 19 passed, 0 failed (continue-in-background 0 errors, 2 size/style warnings)
  • fresh-context subagent review of the diff: findings on cloud variant, checklist ordering, linked-worktree case and --settings wording fixed in a follow-up commit
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/39105802462

Left out: the items under Not verified.

Related

#7288

melodic-automation-lanes Bot and others added 2 commits October 18, 2026 07:13
…ree.bgIsolation

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b7e7a93d709d6d6161bb320cbbf054194d023a39: 0 finding(s), 0 as inline comments.

Security review: PR #8097 (head b7e7a93)

Result: no security issues found (0 findings).

The PR changes three files in the session-flow plugin: a changelog fragment, the continue-in-background skill text, and one new eval case. It has no code, workflow or secret handling.

Instruction-surface lens. The diff softens the dirty-tree refusal, because the skill now launches when the effective worktree.bgIsolation is none. I read docs/conventions/instruction-exception-register/README.md and checked this against its six protected classes (irreversible-action, secret-handling, data-integrity, external-publication, legal-compliance, agent-authority). I found no exploit path.

Why this is not a finding.

  • The refusal only guarded against the background session not seeing uncommitted changes, which is true only while isolation is on.
  • With isolation off, the harness itself runs the session in place, so the skill follows the real setting and does not override a control.
  • The skill reads the setting with jq from settings files. Any other value, or a file that does not parse, leaves the existing gate unchanged.
  • A repo-level .claude/settings.json can set none, but that is the same value the harness would honor anyway.
  • Concurrent edits to the same files remain possible. The launch report must warn about that, and the new eval case 17 tests the warning.
  • The --cloud variant still requires a clean tree that matches its upstream, and the PR says so explicitly.
  • The skill still states that managed settings found in other locations and --settings values are not covered.
  • Eval case 17 contains only a synthetic prompt, so no transcript or secret issue arises.

Comment thread plugins/session-flow/skills/continue-in-background/SKILL.md Outdated
Comment thread plugins/session-flow/skills/continue-in-background/SKILL.md Outdated
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed b7e7a93d709d6d6161bb320cbbf054194d023a39: 0 finding(s), 0 as inline comments.

No blocking findings on head b7e7a93.

I read the full diff (SKILL.md, the changelog fragment, and the new eval) against the PR context and closing issue #7288. I did not run any scripts, so the check results in the PR body (changelog fragments, check-skill) are author-claimed and unverified by me.

Closing issue #7288 acceptance criteria

  • Reads worktree.bgIsolation before the dirty-tree refusal and names the four file layers in order (managed, local, project, user): met in step 1 of SKILL.md.
  • With none, launches and requires the "edits this checkout in place, alongside the user" warning in the launch report: met, and the text also covers the linked-worktree case.
  • States that the --settings tier is not covered: met. The text also marks unreadable managed delivery and unparseable files as not covered or as leaving the gate unchanged.
  • Changelog fragment passes scripts/check-changelog-fragments.sh: author-claimed, not independently run.

Consistency checks

  • The --cloud variant is explicitly excluded from the bypass, and the checklist item matches the new gate order.
  • The upstream-specific claims (tier order, managed-file locations, what none does) are carried as pointers with as-of dates and recheck triggers, as .claude/rules/skill-bodies-state-current-rules.md requires.
  • The new eval (id 17) covers the none plus dirty-tree launch with the warning and the --settings caveat. There is no eval for the managed-tier or unparseable-file branches. That is a minor gap, not a block.

Not verified

  • The settings precedence order and the worktree.bgIsolation semantics come from the issue's recorded independent check. I did not re-read the upstream docs.

…p-ins

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of 3 on 12d2beb.

Comment thread plugins/session-flow/skills/continue-in-background/SKILL.md Outdated
Comment thread plugins/session-flow/skills/continue-in-background/SKILL.md Outdated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Comment thread plugins/session-flow/skills/continue-in-background/SKILL.md Outdated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of 3 on e8cbed7.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: risk MED at head 9c8a362a9cdfe760efa75780fdc4e1e823647061. Only LOW merges without a human; this pull request waits for one.

MED findings:claude-review: 3 open

Comment thread plugins/session-flow/skills/continue-in-background/SKILL.md
@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 19, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: the lane has addressed review threads on this pull request as many rounds as its cap allows.

  • Reason: feedback-round-cap
  • Resume key: 9c8a362a9cdfe760efa75780fdc4e1e823647061 (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=8097 and activity=address-feedback:

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

@kyle-sexton

Copy link
Copy Markdown
Member

Removing needs-human under the owner's overnight procedure (Issue Triage session). The one open review thread, the missing none-branch eval, is covered by eval case 17 at head b7e7a93 (reply on the thread), and is resolved. ci-status and both AI reviews passed on that head. The STALE VERSION failure cleared after main was merged. The SKILL.md change adds text and re-wraps, with no cut. No protected paths, no hold, and the pre-merge scan found no trigger, permission, token or lane-start change.

@kyle-sexton kyle-sexton removed the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 20, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit fc1555c Oct 20, 2026
42 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-7288-39105802462-1 branch October 20, 2026 06:37
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.

session-flow: continue-in-background dirty-tree gate ignores worktree.bgIsolation

1 participant