-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
Add .cursor/worktrees.json and update development commands to support Cursor's native Parallel Agents feature, which uses git worktrees for isolated agent execution.
Problem Statement
When working on an issue and needing to start a second task (e.g. found a bug while working on a feature), the current workflow requires stashing and switching branches. Cursor's Parallel Agents feature can run agents in isolated worktrees, but this repo has no worktree setup configuration.
Proposed Solution
1. Create .cursor/worktrees.json
Setup script to initialize worktrees for this repo:
uv sync(install Python deps)pre-commit install(hooks)git config commit.template .gitmessage- Copy
.envif present
2. Update start-issue.md
When the user is already on a feature branch with changes, offer the parallel agent option as an alternative to stash-and-switch.
3. Document the workflow
Add guidance for when to use parallel agents vs. local mode.
Known Limitations (as of Feb 2026)
Cursor's worktree/parallel agents have known bugs inside devcontainers:
- Path resolution failure — agents produce ENOENT errors with malformed worktree paths in WSL + devcontainer environments.
.cursor/worktrees.jsondetection also fails despite files existing. (Forum: misresolved paths) - Apply button failure — in devcontainers, the "Apply" button tries to read files via
vscode-remote://URIs instead of local paths, failing completely. (Forum: apply failure)
Worktrees work correctly when Cursor runs natively (macOS local, Linux local). Since this project is a devcontainer, the primary user workflow (developing inside the container) is affected. Implementation should proceed once Cursor fixes the devcontainer integration, or can be scoped to local-only development initially.
Research References
- Cursor Parallel Agents docs
- Cursor blog: agent best practices
- Git worktrees done right (bare repo pattern)
- Reddit: organizing worktree folders
- obra/superpowers: using-git-worktrees
Acceptance Criteria
-
.cursor/worktrees.jsoncreated with repo-specific setup script -
start-issue.mdupdated to mention parallel agent option - Devcontainer limitation documented
- Tested with Cursor Parallel Agents in local (non-container) mode