-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Open
Description
Problem
Currently, SpecKit operates on the shared local repository state (checking out branches, modifying HEAD).
This makes it problematic to run multiple SpecKit agents concurrently (e.g., in separate Cursor AI terminals or tabs) without race conditions.
If Agent A switches branches while Agent B is writing files, the file system state becomes corrupted, or git lock errors occur.
Proposed solution
I suggest that SpecKit should support an "isolation mode" leveraging Git Worktrees.
Ideally, a flag or configuration option (e.g., --isolate or --worktree) would:
- Create a temporary git worktree for the specific task/plan (e.g.,
.worktrees/task-id). - Execute the SpecKit plan within that isolated directory.
- Clean up/remove the worktree directory once the task is complete (or upon a specific exit command).
Alternatives
- Cursor Cloud Agents / Native Parallel Mode: Cursor's native "Composer" and "Cloud Agents" already handle this by automatically spinning up isolated environments (remote VMs or local worktrees) for each task.
- Multiple Clones: Cloning the repo multiple times consumes excessive disk space (duplicate
node_modules, etc.). - Manual Worktrees: Manually creating worktrees works, but requires significant boilerplate setup before running SpecKit.
Metadata
Metadata
Assignees
Labels
No labels