Hold turn-end snapshots and reviews while subagents run

This commit is contained in:
Ian Gulliver
2026-10-17 10:37:46 -07:00
parent a76469135b
commit 82d6457d87
2 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -1075,12 +1075,13 @@ func (m *Manager) turnEnded(ctx context.Context, l *live, res endResult) error {
}
}
held := len(l.subagents) > 0
turn := m.event(l, agentActor, "turn.ended", payload)
next, finalizeBy, err := m.store.EndTurn(ctx, l.id, agentActor, nil, &turn, review, finished && !handoff)
next, finalizeBy, err := m.store.EndTurn(ctx, l.id, agentActor, nil, &turn, review && !held, finished && !handoff)
if err != nil {
return err
}
if snapshot {
if snapshot && !held {
m.snapshotSoon(liveTarget(l), api.SnapshotTriggerTurnEnd, 0, review, false)
}