Skip to content

Worktree unmaterialized at coder start: .peer-sync/.claude exist but git worktree is missing #427

@lukstafi

Description

@lukstafi

Summary

When the coder agent for task-ab90fcb7 started, the worktree directory existed at the expected path with .peer-sync/, .claude/, and .ludics-orchestration.json populated, but the actual git worktree had never been created — git did not recognize the path. The agent had to recover manually: move the orchestration files aside, rmdir the empty parent, git worktree add <path> <branch> from the main repo, then move the orchestration files back. This succeeded but suggests a setup-script gap (orchestration scaffolding ran without a successful worktree-create), not coder error.

Data Points

  • task-ab90fcb7 (centralize taskId normalization): Worktree at /Users/lukstafi/ludics-task-ab90fcb7-s1/ had only orchestration scaffolding (.peer-sync, .claude, .ludics-orchestration.json) — no actual git worktree. Recovery required moving these aside, rmdir, git worktree add, restore. (from coder, 2026-04-28)

Raw Excerpts

Original feedback

Worktree was unmaterialized at start. The .peer-sync and .claude dirs existed at /Users/lukstafi/ludics-task-ab90fcb7-s1/ but the actual git worktree had never been created. Recovery path that worked: move .peer-sync/.claude/.ludics-orchestration.json aside, rmdir the empty parent, git worktree add <path> <branch> from the main repo, then move the orchestration files back. Worth flagging if this recurs — may indicate a setup-script gap rather than coder error. — task-ab90fcb7--workflow-feedback-coder.md

Suggested Action

  1. Investigate setup ordering: Find where orchestration scaffolding (.peer-sync, .claude, .ludics-orchestration.json) is populated relative to git worktree add. The scaffolding must run AFTER the worktree create, or it must abort and clean up if the worktree-create failed.
  2. Add a precondition check at coder-startup: if the directory exists but git -C <path> rev-parse --git-dir fails, log a clear error and either (a) auto-recover via the documented recovery path, or (b) fail loudly so the orchestrator can re-provision instead of leaving the agent to improvise.
  3. Track recurrence: Add a journal event or counter every time this recovery path is taken, so we can tell whether this is a one-off or a systemic gap.

Filed by ludics-feedback-digest

Metadata

Metadata

Assignees

No one assigned

    Labels

    workflow-feedbackAuto-filed workflow feedback from agent sessions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions