Merge stalled after clean merge turn
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user