feat: add turn_canceled event for proper interruption handling
Adds a new turn_canceled event type to distinguish intentional turn interruption from errors. Fixes race conditions in Claude agent where concurrent stream() calls could cause garbled output by serializing turn handoff with turn IDs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
076080db48
commit
69b6f755fa
@@ -819,6 +819,7 @@ export function reduceStreamUpdate(
|
||||
case "turn_started":
|
||||
case "turn_completed":
|
||||
case "turn_failed":
|
||||
case "turn_canceled":
|
||||
case "permission_requested":
|
||||
case "permission_resolved":
|
||||
case "attention_required":
|
||||
|
||||
Reference in New Issue
Block a user