docs(agent): describe cancelled post-step checkpoint

This commit is contained in:
Tianyi Cui
2026-07-19 12:35:43 +08:00
parent 0c41ba7ead
commit 7538cef967
6 changed files with 26 additions and 25 deletions

View File

@@ -456,7 +456,7 @@ It returns a `RequestErrorDecision`; `retry` opens a new numbered step after the
type RequestErrorDecision = { action: 'fail' } | { action: 'retry' }
```
`agent/post-step` is the awaited successful-step checkpoint after assistant output, tool results, buffered context, and steering are durable. Its signature is `(agent, turn, step, signal)`; replayable facts remain in the session log rather than a transient payload.
`agent/post-step` is awaited after assistant output, real or synthetic tool results, buffered context, and steering are durable but before `step/end`. A cancelled tool batch reaches it with an aborted signal after draining; its signature is `(agent, turn, step, signal)`, and replayable facts remain in the session log rather than a transient payload.
`agent/turn-stop` returns the stop-only `ContinuationStop` subset or `undefined`. The loop calls this serial checkpoint after folding the ordinary decision, its reason, and pending steering; a stop is terminal and discards pending steering.