[codex] Persist direct prompt user events in durable stream#367
Closed
odysseus0 wants to merge 1 commit into
Closed
[codex] Persist direct prompt user events in durable stream#367odysseus0 wants to merge 1 commit into
odysseus0 wants to merge 1 commit into
Conversation
|
Thanks for the contribution! We're closing this PR and moving the conversation to the issue: #368 We've moved to a model where bugs and feature proposals are discussed in issues/discussions before code review, so the community can help prioritize and shape the work. Your branch is linked from the new thread so the implementation isn't lost — please join us there to continue the conversation. — astrobot 🤖 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
message_enduser event for every direct prompt0for that input and begin runtime output at index1appendEventOncewith a deterministic submission key so normal processing and crash reconciliation can both deliver the event safelyRoot cause
Direct submissions wrote the user input to canonical session state, but only runtime-generated events were subscribed into the public durable event stream.
@flue/reactreconstructs history from that stream, so a refresh could recover the assistant response while permanently omitting the corresponding user prompt.Fixes #307.
Validation
pnpm --dir packages/runtime run buildpnpm --dir packages/runtime run check:typespnpm --dir packages/runtime exec vitest run test/node-agent-coordinator.test.ts test/cloudflare-agent-coordinator.test.ts(57 passed, 1 skipped)