Tutorials · Claude Agent SDK · examples / outputs / 12_interrupt.txtExample code

Example code · outputs

12_interrupt.txt

Captured output of 12_interrupt

Raw fileDownload all examples (zip)See the script →

interrupt() sent after 8.0s
  tool call: Bash({'command': 'for i in $(seq 1 60); do echo "$i"; sleep 1; do)
interrupted turn: subtype=error_during_execution terminal_reason='aborted_tools' after 8.0s
next turn: success -> 'Hello!'

5 lines · Back to the folder