Symptom
Worktrees are created clean from HEAD, so gitignored inputs — node_modules above all — don't exist in them. Every JS/TS task needs [ -e node_modules ] || ln -s <main-repo>/node_modules node_modules in BOTH the worker spec and the check's verify script; forgetting either fails the lane for environment reasons that look like worker failures. (This is the inverse of the documented footgun where gitignored outputs silently vanish from patch exports.)
Evidence
All 12 lanes of a 2026-07-14 fix swarm (protocol-spec-fixes) carried the symlink boilerplate twice each — 24 copies of the same line.
Proposed fix
A run-level (and/or task-level) worktree_setup field in the manifest: a command executed once per worktree after creation, before the worker spawns, with its output captured to the worker log. Example:
{ "worktrees": true, "repo": "/path/repo", "worktree_setup": "ln -s /path/repo/node_modules node_modules" }
Lint could suggest it when repo contains a package.json and worktree_setup is absent. A failing setup command should surface as a setup error (see #37's setup_error plumbing), not as a worker failure.
Size: M.
🤖 Generated with Claude Code
Symptom
Worktrees are created clean from HEAD, so gitignored inputs — node_modules above all — don't exist in them. Every JS/TS task needs
[ -e node_modules ] || ln -s <main-repo>/node_modules node_modulesin BOTH the worker spec and the check's verify script; forgetting either fails the lane for environment reasons that look like worker failures. (This is the inverse of the documented footgun where gitignored outputs silently vanish from patch exports.)Evidence
All 12 lanes of a 2026-07-14 fix swarm (
protocol-spec-fixes) carried the symlink boilerplate twice each — 24 copies of the same line.Proposed fix
A run-level (and/or task-level)
worktree_setupfield in the manifest: a command executed once per worktree after creation, before the worker spawns, with its output captured to the worker log. Example:{ "worktrees": true, "repo": "/path/repo", "worktree_setup": "ln -s /path/repo/node_modules node_modules" }Lint could suggest it when
repocontains a package.json andworktree_setupis absent. A failing setup command should surface as a setup error (see #37's setup_error plumbing), not as a worker failure.Size: M.
🤖 Generated with Claude Code