Repository navigation
Conversation
Owner
Author
|
This implements openai#15355. |
astral303
force-pushed
the
qol/ipc-send
branch
from
October 10, 2026 21:10
56e35de to
00ae961
Compare
astral303
force-pushed
the
qol/ipc-send
branch
from
October 19, 2026 16:23
bf33a1a to
24f143b
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
October 19, 2026 16:23
204e97b to
264f69a
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
October 26, 2026 22:10
264f69a to
6ea0ffe
Compare
astral303
force-pushed
the
qol/ipc-send
branch
2 times, most recently
from
October 28, 2026 01:43
b467a54 to
d058d4d
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
2 times, most recently
from
October 30, 2026 23:30
fa81090 to
a5bd886
Compare
astral303
force-pushed
the
qol/ipc-send
branch
2 times, most recently
from
October 31, 2026 00:38
52a5030 to
84653c0
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
October 31, 2026 00:38
a5bd886 to
7396174
Compare
astral303
force-pushed
the
qol/ipc-send
branch
from
October 31, 2026 00:53
84653c0 to
88f9683
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
October 31, 2026 00:53
7396174 to
1bf7c3e
Compare
astral303
force-pushed
the
qol/ipc-send
branch
from
November 1, 2026 01:54
88f9683 to
3edde51
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
November 1, 2026 01:54
1bf7c3e to
088f9e7
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
November 19, 2026 06:15
088f9e7 to
7ee5671
Compare
astral303
force-pushed
the
qol/ipc-send
branch
2 times, most recently
from
November 20, 2026 08:17
14f76ff to
5ffecaf
Compare
astral303
force-pushed
the
qol/persistent-task-list
branch
from
November 20, 2026 08:17
7ee5671 to
23737ad
Compare
`codex send --thread <uuid> --message <text>` steers the recipient's active turn or starts a new one, as Enter in its composer would. A sender that wants to steer the active turn needs a direct endpoint: `codex queue` writes a SQLite row that the recipient polls every 10 s and dispatches when idle. - Each TUI session binds `$CODEX_HOME/ipc/<thread-id>.sock` (new crate `codex-send`, on `codex_uds`) while it owns its primary thread. A socket that still answers a connection belongs to another live session and is not replaced; a socket that does not answer is stale and is replaced. Rebinding the same thread waits for the previous task's cleanup so the two cannot race on one path. `[ipc] enabled = false` opts out. - A received message takes the composer's Enter gate, `submit_or_queue_user_message`: submitted now when the session takes input, otherwise held in the local follow-up queue, and the reply reports which. Steer versus start, the turn-transition race, and retention during `/review` or `/compact` are the app layer's existing `turn/steer` fallback to `turn/start` and its rejected-steer queue. - A message is rejected while the session displays a subagent thread (`/agents`, `/multi-agents`): the chat widget submits to the displayed thread, not to the endpoint's thread. - Sent text is delivered as a plain user message in both paths: queued text is stored as `Literal` so a drained `!` prefix is not run as a shell command. It carries `UserMessageSource::SentMessage`, which leaves the model's pending questions in place; a typed prompt clears them as the user moving on to new work. A repeated request id within the session's last 64 requests returns the original result without a second submission. - Connections are served one at a time so concurrent senders are submitted in arrival order; a silent connection is closed after 5 s so it cannot hold the accept loop. - Tests cover the socket round trip and lifecycle (multiline text, missing, stale, live, and silent connections), submit-versus-queue outcomes with `!` and `/` text staying plain in both paths, duplicate ids, pending questions surviving a sent message in the submit, steer, and drained-queue paths, rejection while a subagent thread is displayed, the endpoint moving with the primary thread and surviving a same-thread rebind, and the `[ipc]` opt-out.
astral303
force-pushed
the
qol/persistent-task-list
branch
from
November 25, 2026 06:11
23737ad to
e669efd
Compare
astral303
force-pushed
the
qol/ipc-send
branch
from
November 25, 2026 06:11
5ffecaf to
7fda5f9
Compare
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.
The change
A message can now be delivered to a running Codex TUI session while it is working.
codex queueonly delivers after the recipient's current turn ends, so an agent that wants to tell another agent something had to wait for that agent to go idle.After this change
codex send --thread 01a05483-980f-7f13-80a8-a6efb95dd407 --message "Ghidra is available. You can acquire the lock."The recipient treats the text as typed into its composer and submitted with Enter: a running turn is steered, an idle session starts a turn. The command prints
Delivered message to thread …when the text entered the turn pipeline and… accepted the message and will submit it when it can take inputwhen the session held it in its follow-up queue. A thread with no live session, or one that opted out, exits 1 withno live session is listening for thread ….Every session listens by default. Opt out with:
Mechanism
$CODEX_HOME/ipc/<thread-id>.sock(new cratecodex-send, oncodex_uds, so Windows uses the same AF_UNIX path). The directory is owner-only and the socket is 0600 on Unix. A socket that still answers a connection belongs to another live session and is not replaced; one that does not answer is stale and is removed. The socket moves with the primary thread and is removed on exit.{"id","text"}in,{"result":"submitted"|"queued"|"rejected"}out. Connections are served one at a time, so concurrent senders are submitted in arrival order; a connection that sends nothing for 5 seconds is closed. A repeatedidwithin the session's last 64 requests returns the original result without a second submission.submit_or_queue_user_message). Steer versus start, the turn-transition race, and retention during/reviewor/compactare the app layer's existingturn/steerfallback toturn/startand its rejected-steer queue; no new state machine. Sent text is delivered as plain text in both the submit and the queued path:!and/prefixes are not interpreted.UserMessageSource::SentMessage, which skips that clear in both paths.the session is displaying another threadwhile/agentsor/multi-agentsshows a subagent thread: the chat widget submits to the displayed thread, not to the endpoint's thread. Queued messages live in the primary thread's input state, which is stored on a view switch and restored on return.Limitations
--threadtakes a UUID. Session names would require an app-server lookup, which the command avoids.CODEX_HOMEdisables the endpoint with a logged error.$CODEX_HOME/ipcin that sandbox'sunix_socketsallowlist.codex queueand the app-server daemon socket.Validation
!and/text staying plain in both paths, pending questions surviving a sent message.[ipc]is disabled; a message is rejected while a subagent thread is displayed./quit.codex-rs/send/README.mdpass (socket created, idle and working recipient,/review, multiline text, cleanup on/quit, opt-out).