Skip to content

Add Cursor worktree support for parallel agent development #64

@gerchowl

Description

@gerchowl

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 .env if 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.json detection 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

Acceptance Criteria

  • .cursor/worktrees.json created with repo-specific setup script
  • start-issue.md updated to mention parallel agent option
  • Devcontainer limitation documented
  • Tested with Cursor Parallel Agents in local (non-container) mode

Metadata

Metadata

Assignees

Labels

area:workflowDeveloper workflow, commands, rules, skillseffort:medium1-4 hoursfeatureNew feature or requestpriority:lowNice to have, do when capacity allowssemver:minorNew feature, backward-compatible

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions