@@ -141,9 +141,21 @@ func (m *Manager) Start(foreground bool, agentOverride string) error {
141141 // from the shared bare repo (.repo.git) instead of falling back to mayor/rig.
142142 // Falling back to mayor/rig causes the refinery to operate in the mayor's
143143 // clone, which can interfere with mayor operations and confuse agents.
144+ //
145+ // Rigs using a standard .git clone (e.g. beads) never have a .repo.git bare
146+ // repo, so the repair path is not applicable for them. Fall back to mayor/rig
147+ // silently in that case — the fallback is correct and the warning would be noise.
144148 refineryRigDir := filepath .Join (m .rig .Path , "refinery" , "rig" )
145149 if _ , err := os .Stat (refineryRigDir ); os .IsNotExist (err ) {
146- if repairErr := m .repairRefineryWorktree (refineryRigDir ); repairErr != nil {
150+ bareRepoPath := filepath .Join (m .rig .Path , ".repo.git" )
151+ _ , bareErr := os .Stat (bareRepoPath )
152+ standardGitPath := filepath .Join (m .rig .Path , ".git" )
153+ _ , standardGitErr := os .Stat (standardGitPath )
154+ if os .IsNotExist (bareErr ) && standardGitErr == nil {
155+ // Rig uses standard .git layout — worktree repair is not applicable.
156+ // Fall back to mayor/rig silently; the fallback works correctly here.
157+ refineryRigDir = filepath .Join (m .rig .Path , "mayor" , "rig" )
158+ } else if repairErr := m .repairRefineryWorktree (refineryRigDir ); repairErr != nil {
147159 // Repair failed — fall back to mayor/rig as last resort.
148160 _ , _ = fmt .Fprintf (m .output , "⚠ Could not repair refinery worktree: %v (falling back to mayor/rig)\n " , repairErr )
149161 refineryRigDir = filepath .Join (m .rig .Path , "mayor" , "rig" )
0 commit comments