fix(agent-loop): let a concluding tool result beat same-step steering
concludesTurn is terminal: a completed step now carries the concluded fact to the driver, which ends the turn immediately instead of letting steering that arrived during the tool batch (or from an agent/stopping listener) reopen it. The steering is not lost — it drained into the log as steering/message before the decision point, so it feeds the next turn's request. Also annotates the driver's unreachable invariant guards (exhaustiveness default, abort-slot ownership) for the coverage gate.
This commit is contained in:
@@ -100,6 +100,7 @@ forever:
|
||||
each model-order result -> ordered tools/post-execute -> 'tool/result'
|
||||
drain accepted tool context and steering
|
||||
'step/end'
|
||||
a concluding tool result ends the turn; drained steering waits for the next turn
|
||||
continue when tools or steering require another step
|
||||
otherwise agent/stopping -> drain once more -> continue only for steering
|
||||
'turn/end' -> agent/idle
|
||||
|
||||
Reference in New Issue
Block a user