SIGN IN SIGN UP

fix(task): mark interrupted tool calls as errors in persisted history (#1323)

When a task is interrupted while an assistant turn's tool calls (e.g. attempt_completion) are unanswered, resumeTaskFromHistory synthesizes tool_result blocks to keep the API conversation valid. Those synthetic blocks lacked is_error: true, so the persisted api_conversation_history.json ends with a success-looking completion while the task list records the task as interrupted - any consumer inferring completion from history is fooled.

Set is_error: true on both synthetic tool_result sites (assistant-last and missing-results cases), matching the existing error tool_result pattern used for new_task truncation. Adds two regression tests covering both code paths.

Co-authored-by: Eason Liang <easonliang28@gmail.com>
E
eason liang committed
c28a1ffe7d6ff857654520ce93cf0d877bb8946e
Parent: 7e85e27
Committed by GitHub <noreply@github.com> on 8/22/2026, 3:21:36 PM