Skip to content

Pin a spawned worktree only when the caller's worktree is pinned - #270

Merged
haacked merged 1 commit into
mainfrom
haacked/spawn-task-pin-from-caller
Oct 28, 2026
Merged

haacked merged 1 commit into
mainfrom
haacked/spawn-task-pin-from-caller

Conversation

@haacked

@haacked haacked commented Oct 28, 2026

Copy link
Copy Markdown
Owner

/spawn-task pinned every new worktree in Supacode, even when the session that spawned it ran in an unpinned worktree.

spawn-task.sh now pins the new worktree only when the worktree it runs from is pinned. It checks the caller's git root against supacode worktree list --status pinned. Supacode gives a repo's main checkout the status main, not pinned, so spawning from a main checkout doesn't pin.

Test plan

  • bash ai/skills/spawn-task/scripts/tests/test-spawn-task.sh passes, with new cases for a caller in a pinned worktree, an unpinned worktree, and the main checkout
  • Run /spawn-task from a pinned worktree and confirm the new worktree is pinned
  • Run /spawn-task from an unpinned worktree and confirm the new worktree is not pinned

https://claude.ai/code/session_01AovXvaGgyLLBGKc8NqqHLk

spawn-task.sh checks the caller's git toplevel against
`supacode worktree list --status pinned` before it pins the new worktree.

Claude-Session: https://claude.ai/code/session_01AovXvaGgyLLBGKc8NqqHLk
@haacked
haacked marked this pull request as ready for review October 28, 2026 23:34
@haacked
haacked merged commit 9b60a71 into main Oct 28, 2026
1 check passed
@haacked
haacked deleted the haacked/spawn-task-pin-from-caller branch October 28, 2026 23:34
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.

1 participant