Skip to content

fix(core): preserve queued messages after recall - #1706

Open
AaronZ345 wants to merge 1 commit into
chenhg5:mainfrom
AaronZ345:fix/recall-preserve-queued-messages-20260818
Open

fix(core): preserve queued messages after recall#1706
AaronZ345 wants to merge 1 commit into
chenhg5:mainfrom
AaronZ345:fix/recall-preserve-queued-messages-20260818

Conversation

@AaronZ345

Copy link
Copy Markdown
Contributor

Summary

  • preserve messages queued after an active message is recalled
  • resume the oldest surviving message in a replacement agent session while retaining FIFO order
  • avoid treating an intentionally closed agent event channel as a crash that drops the queue

Root cause

The silent recall path cleared the entire pendingMessages queue when stopping the recalled turn. Messages sent after the recalled message were therefore accepted and acknowledged, then discarded without a response.

Tests

  • go test -race ./core -run "TestCUJ_A8_RecallPreservesLaterQueuedMessage|TestHandleMessageRecallPreservesLaterQueueWhenAgentChannelCloses" -count=1
  • go test ./core -count=1
  • go test -tags no_web ./... -count=1

Maintenance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant