Preserve interrupted post-tool context

This commit is contained in:
Hypatia May
2026-07-15 12:49:50 +08:00
parent c3d5568efd
commit edfc4dc4ac
8 changed files with 113 additions and 32 deletions

View File

@@ -20,9 +20,9 @@ flowchart TD
owned["Tool-owned session events<br/><code>todo/write</code>, <code>fs/observed</code>, <code>hook/invoked</code>, <code>hook/result</code>, <code>tool/code-dispatch</code>"]
post["<code>tools/post-execute</code> waterfall<br/>accept, block, replace, add context"]
final["<code>tools/result</code> synchronous notification<br/>frozen authoritative outcome"]
context["Buffered additionalContext<br/>context/message after all tool results"]
context["Batch-deferred additionalContext<br/>context/message after recorded tool results"]
toolResult["Session event: <code>tool/result</code><br/>single model-facing outcome"]
allResults["All calls in the step settled<br/>and tool/result events recorded"]
allResults["Tool batch settled<br/>recorded tool/result events complete"]
presentResult["UI completed card<br/>presentResult(args, result)"]
model --> toolCall
toolCall --> presentCall