[projman] Parallel agents conflict when modifying shared files #234

Closed
opened 2026-01-28 15:22:14 +00:00 by lmiranda · 0 comments
Owner

Problem

When multiple agents run in parallel, they all work in the same directory. If two tasks touch the same file (e.g., hooks.json), they conflict.

Current Behavior

  • Sprint 3: #225 and #226 both needed to create git-flow/hooks/hooks.json
  • Both agents created the file independently
  • Files ended up on wrong branches
  • Had to manually sort out commits and cherry-pick

Expected Behavior

  • Parallel agents should either:
    1. Work in isolated worktrees
    2. Have coordination logic for shared resources
    3. Be sequenced automatically if they touch the same files

Suggested Solutions

  1. Git worktrees - Each agent gets isolated worktree for its branch
  2. File locking - Detect shared file access, sequence those tasks
  3. Dependency detection - Planner identifies file conflicts, adds implicit dependencies
  4. Merge coordination - Orchestrator handles merging parallel changes

Acceptance Criteria

  • Parallel agents dont corrupt each others work
  • Shared file modifications are handled gracefully
  • Clear error if conflict detected
## Problem When multiple agents run in parallel, they all work in the same directory. If two tasks touch the same file (e.g., hooks.json), they conflict. ## Current Behavior - Sprint 3: #225 and #226 both needed to create git-flow/hooks/hooks.json - Both agents created the file independently - Files ended up on wrong branches - Had to manually sort out commits and cherry-pick ## Expected Behavior - Parallel agents should either: 1. Work in isolated worktrees 2. Have coordination logic for shared resources 3. Be sequenced automatically if they touch the same files ## Suggested Solutions 1. **Git worktrees** - Each agent gets isolated worktree for its branch 2. **File locking** - Detect shared file access, sequence those tasks 3. **Dependency detection** - Planner identifies file conflicts, adds implicit dependencies 4. **Merge coordination** - Orchestrator handles merging parallel changes ## Acceptance Criteria - [ ] Parallel agents dont corrupt each others work - [ ] Shared file modifications are handled gracefully - [ ] Clear error if conflict detected
lmiranda added the Component/BackendType/FeaturePriority/High labels 2026-01-28 15:23:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#234