You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/session-flow:continue-in-background's dirty-tree gate assumes a background session always moves into an isolated git worktree before editing, unless the current session is already in a linked worktree. The worktree.bgIsolation setting can turn that isolation off, and then the background session edits the working copy directly. The gate does not read the setting, so its reasoning and outcome are wrong in that configuration.
In a git repository, set "worktree": {"bgIsolation": "none"} in .claude/settings.json.
Leave an uncommitted change in the checkout.
Run /session-flow:continue-in-background.
Expected behavior
The gate accounts for worktree.bgIsolation. With isolation off, the launched session sees the uncommitted changes, so the "changes won't carry over" reason for refusing does not apply. The real risk is different: the background session and the user would edit the same checkout at the same time, and the launch report should say so.
Actual behavior
SKILL.md:124-130: "Background sessions move into an isolated git worktree (a fresh checkout) before editing files (https://code.claude.com/docs/en/agent-view), so OTHER uncommitted changes in this checkout would NOT carry into the launched agent's edits. Any such changes → do NOT launch". The only exception is a session already inside a linked worktree.
Live docs, https://code.claude.com/docs/en/agent-view#how-file-edits-are-isolated (read 2026-10-12): "To turn off worktree isolation for a repository where git worktrees are impractical, set worktree.bgIsolation to "none". Background sessions then edit your working copy directly without moving into a worktree first." The same section lists other skip cases (a session moved to the background with /background, a write outside the working directory).
Nothing in plugins/session-flow/ mentions bgIsolation (grep -rn bgIsolation plugins/session-flow returns nothing). The source-control plugin already names the setting (plugins/source-control/hooks/worktree-create-gate.sh:64).
Suggested fix
Read the effective worktree.bgIsolation value before the dirty-tree check. When it is "none", skip the "changes won't carry over" refusal and instead warn that the launched session will edit this checkout in place, alongside the user. This is a gate-logic change, not a pointer fix.
Environment
session-flow on main as of 2026-10-12.
Found during the upstream-pointer sweep (PRs #7061-#7274).
Thanks for the detailed report. Confirmed: plugins/session-flow/skills/continue-in-background/SKILL.md's dirty-tree gate (step 1) refuses to launch on any uncommitted changes other than save-point files, reasoning that a background session always moves into an isolated worktree first — but nothing under plugins/session-flow/ accounts for worktree.bgIsolation: "none", which (per the docs link you cited) makes the background session edit the working copy directly instead. So when that setting is off, the gate's stated reason for refusing ("changes won't carry over") doesn't hold, and the real risk — concurrent edits to the same checkout — goes unmentioned in the launch report.
No duplicate found; the closest prior issue (#929, "dirty-tree gate unspecified when consuming directory is not a git repository") covers a different gap that the current SKILL.md text already handles, and isn't the same as this one.
Decision recorded. The owner approved applying independently verified recommendations (confirmed, low-risk set) on 2026-10-13.
With bgIsolation "none" and a dirty tree, what should the gate do? → Launch, and state in the launch report that the background session edits this checkout alongside the user
Basis: https://code.claude.com/docs/en/agent-view#how-file-edits-are-isolated (fetched 2026-10-12): "Background sessions then edit your working copy directly"; plugins/session-flow/skills/continue-in-background/SKILL.md:124-133
How does the skill read the effective bgIsolation value? → Read worktree.bgIsolation from the settings layers in precedence order (managed, local, project, user) with jq
Basis: https://code.claude.com/docs/en/agent-view (example in project .claude/settings.json); judgment on scope precedence, settings page not re-read for precedence this run
continue-in-background refuses to launch on uncommitted changes because it assumes the background session moves into a worktree, but worktree.bgIsolation: "none" makes it edit the checkout in place. Main now points at the docs section listing skip cases, but nothing under plugins/session-flow reads bgIsolation.
Type: Bug Summary: continue-in-background's dirty-tree gate reads worktree.bgIsolation and, when it is none, launches with a warning instead of refusing.
Current behavior:
The gate assumes a background session always moves into an isolated worktree unless the current session is already in a linked worktree, so it refuses to launch on any uncommitted change. With worktree.bgIsolation: "none" the background session edits the working copy directly, so the refusal reason does not hold and the real risk (two sessions editing one checkout) goes unreported.
Desired behavior:
Before the dirty-tree check, the skill reads the effective worktree.bgIsolation from the settings files in precedence order (managed, local, project, user) and says that a --settings command-line value cannot be read from files.
When the value is none, the skill launches and the launch report states that the background session edits this checkout in place, alongside the user.
Otherwise the existing gate is unchanged.
Key interfaces:
Setting worktree.bgIsolation: value none changes the gate outcome.
Launch report: gains the shared-checkout warning line in that case.
Acceptance criteria:
The skill text reads worktree.bgIsolation before the dirty-tree refusal and names the four file layers in order.
With none, the text launches and requires the shared-checkout warning in the launch report.
The text says the command-line --settings tier is not covered.
scripts/check-changelog-fragments.sh passes.
Out of scope:
The other isolation skip cases (a session moved with /background, writes outside the working directory).
The source-control worktree-create gate's own handling of the setting.
Eval runs.
This was generated by AI during backlog shaping.Held, not admitted: this brief is drafted and checked, but the issue lane would stop on it today. It is admitted, by adding agent-ready, once the lane can run the skill-quality check scripts (Automation Lanes' PR #7912). Held under the owner's 2026-10-18 lane-narrowing course correction.
Activity
github-actions commentedon Oct 12, 2026
Thanks for the detailed report. Confirmed:
plugins/session-flow/skills/continue-in-background/SKILL.md's dirty-tree gate (step 1) refuses to launch on any uncommitted changes other than save-point files, reasoning that a background session always moves into an isolated worktree first — but nothing underplugins/session-flow/accounts forworktree.bgIsolation: "none", which (per the docs link you cited) makes the background session edit the working copy directly instead. So when that setting is off, the gate's stated reason for refusing ("changes won't carry over") doesn't hold, and the real risk — concurrent edits to the same checkout — goes unmentioned in the launch report.No duplicate found; the closest prior issue (#929, "dirty-tree gate unspecified when consuming directory is not a git repository") covers a different gap that the current SKILL.md text already handles, and isn't the same as this one.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 13, 2026
Decision recorded. The owner approved applying independently verified recommendations (confirmed, low-risk set) on 2026-10-13.
Basis: https://code.claude.com/docs/en/agent-view#how-file-edits-are-isolated (fetched 2026-10-12): "Background sessions then edit your working copy directly"; plugins/session-flow/skills/continue-in-background/SKILL.md:124-133
Basis: https://code.claude.com/docs/en/agent-view (example in project .claude/settings.json); judgment on scope precedence, settings page not re-read for precedence this run
continue-in-background refuses to launch on uncommitted changes because it assumes the background session moves into a worktree, but
worktree.bgIsolation: "none"makes it edit the checkout in place. Main now points at the docs section listing skip cases, but nothing under plugins/session-flow reads bgIsolation.Verification notes:
Verified by an independent fresh-context check (confirmed, risk low): gh issue view 7288 (open, bot comment only); origin/main continue-in-background/SKILL.md:118-133; git grep bgIsolation origin/main -- plugins/session-flow (none); https://code.claude.com/docs/en/agent-view.md fetched 2026-10-12: line 561 bgIsolation none edits working copy directly; https://code.claude.com/docs/en/settings-reference.md fetched 2026-10-12: worktree.bgIsolation, Scope Any file; https://code.claude.com/docs/en/settings.md Settings precedence (managed, command line, local, project, user)
Admission to an agent lane stays with the work-class rules and owner ratification.
kyle-sexton commentedon Oct 18, 2026
Agent Brief
Type: Bug
Summary: continue-in-background's dirty-tree gate reads
worktree.bgIsolationand, when it isnone, launches with a warning instead of refusing.Current behavior:
The gate assumes a background session always moves into an isolated worktree unless the current session is already in a linked worktree, so it refuses to launch on any uncommitted change. With
worktree.bgIsolation: "none"the background session edits the working copy directly, so the refusal reason does not hold and the real risk (two sessions editing one checkout) goes unreported.Desired behavior:
worktree.bgIsolationfrom the settings files in precedence order (managed, local, project, user) and says that a--settingscommand-line value cannot be read from files.none, the skill launches and the launch report states that the background session edits this checkout in place, alongside the user.Key interfaces:
worktree.bgIsolation: valuenonechanges the gate outcome.Acceptance criteria:
worktree.bgIsolationbefore the dirty-tree refusal and names the four file layers in order.none, the text launches and requires the shared-checkout warning in the launch report.--settingstier is not covered.scripts/check-changelog-fragments.shpasses.Out of scope:
/background, writes outside the working directory).This was generated by AI during backlog shaping. Held, not admitted: this brief is drafted and checked, but the issue lane would stop on it today. It is admitted, by adding
agent-ready, once the lane can run the skill-quality check scripts (Automation Lanes' PR #7912). Held under the owner's 2026-10-18 lane-narrowing course correction.