Skip to content

Bug: Worktree directories disappear during concurrent AI agent operations #168

@kaeawc

Description

@kaeawc

Description

Entire worktree directories sometimes disappear when multiple AI agents are modifying their separate branches concurrently in a local setup.

Environment

  • Setup: Local only (no remote operations)
  • Scenario: Multiple AI agents working on separate branches concurrently
  • Operations: Concurrent modifications, sometimes with rebases onto main

Expected Behavior

Worktree directories should remain stable and accessible even when multiple agents are working concurrently.

Actual Behavior

The entire worktree directory sometimes disappears, making the branch and work inaccessible.

Related Resources

Potential Causes

  • Race conditions during concurrent git operations
  • File system issues during simultaneous writes
  • Git garbage collection running during active operations
  • Corrupted .git state from concurrent access

Impact

  • Complete loss of work if not backed up
  • Requires manual cleanup and recreation of worktrees
  • Disrupts parallel AI development workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-agentsRelated to AI agent workflowscomponent: git-safetyGit operation safety and corruption preventioneffort: mediumModerate development effortphase: 1-foundationPhase 1: Foundation and researchpriority: criticalMust be addressed immediatelytype: critical-bugCritical bug causing data loss or corruption

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions