Skip to content

fix: prevent claim prompts from tracking main - #4285

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-4185
Aug 15, 2026
Merged

fix: prevent claim prompts from tracking main#4285
atomantic merged 1 commit into
mainfrom
claim/issue-4185

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • Four shipped task-prompt defaults (plan-task, claim-issue, claim-issue-gitlab, claim-issue-jira) told agents to run git worktree add -b <branch> <path> origin/main, which makes the new branch inherit main as its git upstream. A later config-derived push (as used by /do:pr-style flows) could then land straight on main instead of opening a PR — the exact CoS agent worktree branches track refs/heads/main, so /do:pr's config-derived push lands on main #4172 failure mode, but on the prompt path rather than the code path.
  • Adds --no-track to those four git worktree add commands. Each prompt's later git push -u origin <branch> step still sets the correct upstream, so untracked is the right shape. dependency-updates is deliberately left alone — it branches from a PR's own head, where inheriting that branch as upstream is correct.
  • Bumps PROMPT_VERSIONS for all four touched prompts, preserves each pre-change body in PREVIOUS_DEFAULT_PROMPTS so installs holding the old default auto-upgrade instead of being flagged customized, and regenerates the integrity snapshot.
  • Adds a source-grep guard test asserting every worktree add command in these four prompts carries --no-track, plus a companion test confirming dependency-updates still tracks its PR head.

Closes #4185.

Test plan

  • cd server && NODE_ENV=test npx vitest run taskPromptDefaults — 37/37 passing
  • Full server suite run under heavy concurrent-worktree CPU contention showed unrelated Test timed out in 10000ms flakes in a different, non-overlapping set of files on each run (peerSync/privacy/sprites/universeBuilder on one run, imessageSync and others on another) — consistent with resource-contention flakiness, not a regression from this change

@atomantic
atomantic merged commit f753228 into main Aug 15, 2026
6 checks passed
@atomantic
atomantic deleted the claim/issue-4185 branch August 15, 2026 14:31
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.

Claim/plan-task prompt templates tell agents to run git worktree add -b … origin/main without --no-track, so the claim branch tracks main

1 participant