Repository navigation
Conversation
bolinfest
added a commit
that referenced
this pull request
Aug 14, 2025
As `Session` needs a bit of work, it will make things easier to move around if we can start by reducing the extent of its public API. This makes all the fields private, though adds three `pub(crate)` getters. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/2285). * #2287 * #2286 * __->__ #2285
gpeal
approved these changes
Aug 14, 2025
| } | ||
| } | ||
|
|
||
| async fn apply_bespoke_event_handling( |
Collaborator
Author
There was a problem hiding this comment.
Well, as opposed to the general treatment we give to apply EventMsg variants in add_conversation_listener(), which is that we forward all of them as notifications, whether or not we believe they are actually useful.
Though as noted in:
// For now, we send a notification for every event,
// JSON-serializing the `Event` as-is, but we will move
// to creating a special enum for notifications with a
// stable wire format.I would like to stop doing that in the near future.
*** fix: add support for exec and apply_patch approvals in the new wire format
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Now when
CodexMessageProcessorreceives either aEventMsg::ApplyPatchApprovalRequestor aEventMsg::ExecApprovalRequest, it sends the appropriate request from the server to the client. When it gets a response, it forwards it on to theCodexConversation.Note this takes a lot of code from:
https://github.com/openai/codex/blob/main/codex-rs/mcp-server/src/conversation_loop.rs
https://github.com/openai/codex/blob/main/codex-rs/mcp-server/src/exec_approval.rs
https://github.com/openai/codex/blob/main/codex-rs/mcp-server/src/patch_approval.rs
I am copy/pasting for now because I am trying to consolidate around the new
wire_format.rs, so I plan to delete these other files soon.Now that we have requests going both from client-to-server and server-to-client, I renamed
CodexRequesttoClientRequest.Stack created with Sapling. Best reviewed with ReviewStack.