feat(agents): stream cursor InteractionUpdate deltas (#951) #988
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!988
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/951"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wire the cursor SDK's
onDeltacallback so the runner gets fine-grained text / thinking / tool-call / shell-output / token / summary updates alongsideRun.stream(); whole-message events that overlap are suppressed when the delta path is active so each turn renders once.Test plan
interactionUpdateToTaskEventsmaps every documentedInteractionUpdatevariant;decodeShellOutputDeltahandles string + Uint8Array + garbage frames.streamRunWithStallAndAbortinterleaves SDK stream + delta queue and suppresses whole-message duplicates.shell-output-deltaupdates stay bounded byDeltaQueuecapacity (oldest-dropped); 10 000 deltas throughevent-logproduce oneshell_outputrow capped at 16 KiB.text_deltaaccumulates into oneassistant_deltarow per turn (64 KiB tail);turn_endedandresultreset state.text_delta/shell_output_delta/usage_deltabroadcast verbatim to live subscribers.bun run --cwd apps/server qa— 3371 tests pass.Closes #951
All AC from #951 met. Port types, adapter mapping, coalescing, backpressure, and docs are correct.
Nit:
DeltaQueue.droppedis mentioned in comments as surfacing via a system event, but nothing actually reads.droppedto emit one — operator can't tell when frames were silently dropped. Not blocking.