Merge stalled after clean merge turn

This commit is contained in:
Ian Gulliver
2026-10-16 09:16:26 -07:00
parent 1a2710f7c8
commit c08d993104
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -703,6 +703,13 @@ func (m *Manager) handle(ctx context.Context, l *live, ev claude.Event) error {
if err != nil {
return err
}
m.mu.Lock()
interrupted := l.interrupted
m.mu.Unlock()
if res.NumTurns == 0 && !res.IsError && res.Result == "" && !interrupted {
slog.Info("ignored result with no model turns", "session", l.id, "subtype", res.Subtype, "duration_ms", res.DurationMS)
break
}
return m.turnEnded(ctx, l, endResult{
subtype: res.Subtype,
isError: res.IsError,
@@ -848,6 +855,9 @@ func (m *Manager) turnEnded(ctx context.Context, l *live, res endResult) error {
return nil
case mergeBy != "":
go m.releaseMerge(l.projectID, l.taskID)
if !res.isError || interrupted {
m.fileError(l, "The Merge turn ended unfinished (interrupted, or with no final message), so byre didn't squash or push the task. Merge again to retry.")
}
default:
go m.nextMerge(l.projectID)
}