fix(runtime): agent-wake client-event translation, full-tail persistence, processing guard#25958
Conversation
…nce, processing guard
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83558efbf6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| target.markProcessing(false); | ||
| } catch (err) { |
There was a problem hiding this comment.
Drain queued messages when wake clears processing flag
wakeAgentForOpportunity now sets processing=true, so concurrent user sends are routed through enqueueMessage, but on completion it only flips the flag back to false and returns. If a user message arrives during the wake, it can remain stranded in conversation.queue until a later unrelated turn calls drainQueue, which can delay or reorder user messages (a fresh non-queued send can run before the older queued one). Please drain the queue as part of wake teardown (or avoid queueing in this path) before releasing processing.
Useful? React with 👍 / 👎.
| case "thinking_delta": | ||
| return { | ||
| type: "assistant_thinking_delta", | ||
| thinking: event.thinking, | ||
| conversationId, |
There was a problem hiding this comment.
Respect streamThinking setting in wake event translation
The new wake translator always emits assistant_thinking_delta for thinking_delta events, but the canonical conversation path only forwards thinking deltas when streamThinking is enabled. In deployments with thinking.streamThinking=false, wake-originated turns will still expose thinking output to clients, which diverges from configured behavior. This translation should be gated (or suppressed) the same way as the normal handler.
Useful? React with 👍 / 👎.
|
Follow-up shipped in #26265 — addresses consolidated review feedback (chat concurrency mutex, dispose teardown, wake adapter timeout/ghost prevention, tokenEstimationProvider forwarding, E2E test flakiness). |
Summary
Fixes 3 correctness gaps in wakeAgentForOpportunity identified during plan review.
Part of plan review for meet-phase-2-chat.md.