Route SM control socket messages as user turns#12
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23113e9c9d
ℹ️ 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".
|
@codex review |
|
Addressed Codex P1 by preserving the control-socket thread_id contract. submit_message now carries target_thread_id through the external-message event and routes the generated UserTurn/AddToHistory to submit_thread_op(thread_id, ...) when supplied; active-thread submissions keep the existing direct TUI path.\n\nRe-verified:\n- cargo fmt\n- cargo test -p codex-tui control_socket --lib\n- cargo test -p codex-tui external_literal_message_submits_user_turn --lib\n- cargo build --release -p codex-cli\n- live SM probe 745a2b1b: sm send delivered, agent replied SM_SEND_PROBE2_OK, event stream shows sm payload as type=user_turn\n\n@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b7642742b
ℹ️ 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".
|
@codex review |
|
Addressed the second Codex P1 by keeping targeted control-socket messages out of the untargeted pre-configuration queue. For submit_message(thread_id=...), the event path now uses prepare_targeted_external_literal_user_message(...), which prepares the UserTurn immediately even before the active TUI session is configured, then routes it via submit_thread_op(thread_id, ...).\n\nRe-verified:\n- cargo fmt\n- cargo test -p codex-tui control_socket --lib\n- cargo test -p codex-tui external_literal_message --lib\n- cargo build --release -p codex-cli\n- restarted local Session Manager on rebuilt codex-fork binary\n\n@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ff758ef7a
ℹ️ 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".
|
Addressed the third Codex P1 by preparing targeted control-socket turns from the target thread's stored session/input context instead of the active TUI thread. Targeted inactive-thread turns now use the target cwd, model, approval policy, sandbox policy, permission profile, reasoning effort, and collaboration mask. Re-verified:
@codex review |
|
@codex review |
|
Addressed the third Codex P1 by preparing targeted control-socket Re-verified:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18480c14c3
ℹ️ 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".
|
Addressed the fourth Codex P1 by preserving literal semantics for untargeted external messages that arrive before session configuration. The pre-config queue now records those as Re-verified:
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 899b71db59
ℹ️ 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".
|
Addressed the latest Codex review on
Re-verified:
Fresh release build is running from @codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0115e65074
ℹ️ 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".
|
Addressed the P2 from the Re-verified:
@codex review |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b54187d4e
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cb555ee44
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cb555ee44
ℹ️ 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".
|
Fixed the current-head review followups in Changes:
Validation:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00b47082fd
ℹ️ 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".
|
Fixed the inactive-target pending-start P1 in Changes:
Validation:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d3697b44e
ℹ️ 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".
|
Fixed the active-thread targeted queue P1 in Changes:
Validation:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 301bb28b5f
ℹ️ 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".
|
Fixed the latest review followups in Changes:
Validation:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecc355dc7f
ℹ️ 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".
|
Review follow-up pushed at 40986a5.\n\nChanges:\n- Route omitted-thread external messages through the same active-thread-aware submit path instead of the legacy direct chat-widget submit.\n- Only queue active-thread external messages while a user turn is pending start; running turns now go through thread submit so they can steer.\n- Stop silently queueing inactive-thread messages when there is no active turn id; surface a not-ready error instead.\n- Synchronize cached inactive thread input state from background turn notifications/session refreshes so pending-start state does not go stale.\n\nValidation:\n- cargo fmt\n- cargo test -p codex-tui external_literal_message --lib\n- cargo test -p codex-tui targeted_external_literal_input_state --lib\n- cargo test -p codex-tui control_socket --lib |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40986a593f
ℹ️ 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".
|
Review follow-up pushed at baf3929.\n\nChanges:\n- Return rejection for inactive target threads when a turn is active but non-steerable, instead of acknowledging delivery into an inactive queue.\n- Preserve FIFO order when rejected external literal steers are requeued.\n- Preserve inactive target collaboration masks for model/effort instead of overwriting them with session defaults.\n- Clarify chat-composer docs for the external LiteralUserTurn queue action.\n\nValidation:\n- cargo fmt\n- cargo test -p codex-tui external_literal_message --lib\n- cargo test -p codex-tui targeted_external_literal_input_state --lib\n- cargo test -p codex-tui external_literal_rejected_steers_preserve_fifo_order --lib\n- cargo test -p codex-tui control_socket --lib\n- cargo test -p codex-tui active_turn_not_steerable --lib\n- cargo test -p codex-tui active_turn_steer_race --lib |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Maintainer merge note for current head Codex review is clean: #12 (comment) Local verification on the reviewed head passed:
CI is red for repo workflow/configuration issues outside this PR diff: Bazel exits before build because remote downloader is enabled without gRPC caching/BuildBuddy key, and npm staging is still hard-coded to The local Session Manager codex-fork runtime has been pinned to this reviewed binary via |
Summary\n\n- Route control-socket submitted messages through the TUI literal external-message path instead of manually constructing deprecated UserInput ops.\n- Make literal external messages reuse normal UserTurn construction so current cwd/model/sandbox/approval context is attached.\n- Add regression coverage for thread-id control-socket submissions and external literal message submission.\n\n## Verification\n\n- cargo fmt\n- cargo test -p codex-tui control_socket --lib\n- cargo test -p codex-tui external_literal_message_submits_user_turn --lib\n- cargo build --release -p codex-cli\n- live Session Manager probe: spawned codex-fork 3510cb42, sent sm payload, observed SM_SEND_PROBE_OK and event stream op_submitted type=user_turn\n\nFixes rajeshgoli/session-manager#653\n