seams: the parallel-execute worktree fork point IS caller-selectable via worktree.baseRef #68
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence#68
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened
cadence-core/references/seams.mdstates that the parallel-execute worktree's fork point cannot be controlled:The second sentence is false. The fork point is controllable, and the setting that controls it describes Cadence's exact use case.
Per the worktrees documentation,
worktree.baseReftakes two values:"fresh"(default): branch from the repository's default branch on the remote, usuallymain."head": branch from the current localHEAD, carrying unpushed commits and feature-branch state. The doc's stated use case is verbatim "Use this when isolating subagents that need to operate on in-progress work."And on subagents specifically: "Subagent worktrees use the same base branch as
--worktree, so they branch from your repository's default branch unlessworktree.baseRefis set tohead."The default is
"fresh". That is the root cause of the observed failure. A phase's CONTEXT and itsPLAN-2.mdlive in unpushed commits on the integration branch, a"fresh"worktree forks fromorigin/mainand does not have them, and the executor lands 31 commits behind holding none of its own inputs.What you expected
seams.mdto state the constraint that actually holds, and the parallel path to run against a base that contains its own plan files.Reproduction
Read
cadence-core/references/seams.md:54-60for the claim, then the "Choose the base branch" section ofhttps://code.claude.com/docs/en/worktreesfor the setting that contradicts it.Observed failure already recorded at
.planning/CAPTURE.md:5.Environment
node --version: v26.4.0fba5879parallelization.enabled,parallelization.use_worktrees(the parallel arm is opt-in and off by default)Notes, and two honest qualifications
It is a setting, not a per-dispatch parameter.
worktree.baseReflives in the Claude Code settings cascade. A plugin cannot set it unilaterally, and Cadence should not silently write a user's settings. So the fix is not a change at the dispatch site. The realistic shape is a preflight inexecute.md'sexecute_parallelgate that reads the effective value and refuses to parallelize under"fresh", plus a/cad-configstep that offers to write"head", plus the corrected prose inseams.md.It wants a minimum Claude Code version. Worktree base-branch behavior changed at 2.1.208 (before that, a fresh worktree used whatever
origin/HEADhappened to be cached locally). Whatever Cadence claims about fork points should name the version the claim holds for.One nuance to carry into the fix: inside a worktree,
"head"resolves to that worktree'sHEAD, not the main checkout's.Do not remove the executor's assertion.
agents/cad-executor.md's<worktree_mode>check, which asserts its ownPLAN-<k>.mdexists before task 1 and haltsblockednaming the missing path, stays regardless. It is cheap, it caught this failure, and a setting the user can change back is not a guarantee. What changes is that the halt stops being the only answer Cadence has.This finding predates the v1.4.0 close, which restated the worktree binding across six surfaces on the strength of the claim above. Every one of those surfaces needs the corrected version.