Hold turn-end snapshots and reviews while subagents run
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user