feat(agents): replay cursor Run.conversation() on resume #992
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!992
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/956"
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?
Closes #956
Restore cursor session visibility after a worker crash by translating
Run.conversation()into the existingTaskEventshapes (user,assistant,tool_progress,tool_summary) and yielding them at the head of the resumed run's stream withreplayed: true.Test plan
just qaclean (typecheck + biome + 3405 server tests)conversationTurnToTaskEventscoversagentConversationTurn,shellConversationTurn, unknown shapesreplayConversationForAgentyields divider + per-turn events; idempotent across two calls;cursor_replay_skippedon listRuns failure; empty listRuns yields nothinguser → assistant → tool_progress → tool_summary → assistantprefix withreplayed: trueon every rowreplayed:truepropagates onto persisted rows + SSE; non-replayed events leave the flag undefined;cursor_replay_startsystem row becomes a dividerCorrect and well-covered.
pushReplaywrapper is a clean pattern. Nit:if (turns.length === 0 || !lastRun) returnafter the dedup block is unreachable, but harmless.