Problem
When running orch run from a git worktree, the run is not visible when running orch ps from the main repository.
Root Cause
The config uses vault: . which is a relative path. When orch runs from a worktree:
vault: . resolves to the worktree directory
- A new
.orch/ directory is created in the worktree
- A separate daemon starts for the worktree's vault
- Runs are tracked in the worktree's vault, not the main repo's vault
Reproduction
# From main repo
cd ~/repos/orch
orch ps # Shows runs
# From a worktree
cd .git-worktrees/gh#285/...
orch run gh#287 # Creates run
# Back to main repo
cd ~/repos/orch
orch ps # Run gh#287 NOT visible!
# From worktree
cd .git-worktrees/gh#285/...
orch ps # Run gh#287 IS visible
Evidence
=== Worktree .orch ===
daemon.sock daemon.pid ...
=== Main repo .orch ===
daemon.sock daemon.pid ... (different daemon!)
Suggested Fix
When in a git worktree, orch should detect this and use the main repo's vault instead of creating a new one. Options:
- Resolve
vault: . to the git root (not worktree root)
- Follow
.git file in worktrees to find the main repo
- Use absolute path in config instead of relative
Impact
- Runs started from worktrees are invisible from main repo
- Multiple daemons running for same logical project
- Confusing UX when switching between main repo and worktrees
Problem
When running
orch runfrom a git worktree, the run is not visible when runningorch psfrom the main repository.Root Cause
The config uses
vault: .which is a relative path. When orch runs from a worktree:vault: .resolves to the worktree directory.orch/directory is created in the worktreeReproduction
Evidence
Suggested Fix
When in a git worktree, orch should detect this and use the main repo's vault instead of creating a new one. Options:
vault: .to the git root (not worktree root).gitfile in worktrees to find the main repoImpact