Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
When the primary thread A kept its IPC endpoint while the TUI displayed writable thread B,
codex send --thread Asubmitted through B's widget. The endpoint's destination was lost in both the incoming event and the later unscopedCodexOp.This change carries the primary thread ID and a fresh endpoint generation through IPC requests, queued input, automatic recovery, operation dispatch, and optimistic history events. Delivery is rejected if the endpoint has been replaced or its thread is not the active displayed thread. The second dispatch check prevents a thread switch after initial acceptance from redirecting the user turn. Ordinary manual input retains its existing path.
Validation on Linux with official Rust 1.95.0:
cargo fmt -- --checkandgit diff --checkpassed. TUI test debug symbols were disabled to fit the environment's memory limit; assertions stayed enabled.On the exact original head, the witness test passed: an IPC request for A was accepted and produced a user turn and ordinary message history through displayed thread B. The accompanying rejection regression failed at its intended assertion. The original production code was unchanged. See
docs/repros/ipc-wrong-thread.mdanddocs/repros/ipc-wrong-thread.patchfor the minimal reproduction and commands.Removing only the second dispatch scope check made 2 of the 6 App tests fail at their stale-event/session-switch assertions (4 passed). After restoring the check, all 6 App tests and all 9 send/widget tests passed again. These tests exercise the real AppEvent dispatcher and widget submission with an in-process app-server fixture; they do not establish real socket or model execution.
Based on astral303/codex PR astral303#18 head
00ae96124babb37e25f77d568858c693ea9a2afd. This is a narrow routing fix. Same-account processes can still submit text as ordinary user input; sender authentication, socket ownership/cleanup races and transport denial-of-service remain unresolved. Actual socket lifecycle tests and Windows execution are not verified here. Acceptance and a user-message echo do not prove agent execution.Use only in an isolated test environment. No main-environment installation, merge or release is part of this change.