You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attributed inter-agent messages: sender identity and role on codex queue and app-server inject, plus a consumption receipt event #45976
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesenhancementNew feature or requestsubagentIssues involving subagents or multi-agent features
CLI (codex-cli 0.153.4 on macOS 26.6, ChatGPT auth)
What feature would you like to see?
codex queue --thread <id> --message <text> and app-server thread/inject are the ways an external orchestrator can reach a running Codex session. Both deliver the text as if the user typed it: no sender identity, no role, no reply address. In a multi-agent setup (Codex and Claude Code sessions in tmux with a shared message bus) this costs two things:
Provenance. The model cannot tell a peer agent's message from the human's instruction, so it treats agent text with the user's authority. We want agent-to-agent traffic attributed ("from agent X") and only the human's words treated as the human's.
Correctness. [Bug] Inter-agent message can cause Codex to resurrect and answer an old user prompt #45894 reports that an inter-agent message arriving mid-conversation can make Codex resurrect and answer an old user prompt. An attributed, distinct input kind would let the runtime present the message as an event in the current thread state rather than as another user turn.
Proposal
codex queue: add --from <id> and --role <agent|system|user> (default user for compatibility). With --role agent, deliver the text as a distinct input item with the sender identity visible to the model (a developer-role message or an event block), never as a plain user prompt.
app-server: the same fields on thread/inject; emit a notification when a queued or injected item is consumed by a turn (for example thread/inputConsumed with the queue item id, thread id and turn id), so senders get a receipt instead of polling the queue store.
Document that queue acceptance is not a model-read receipt; the consumed event is the receipt.
Additional information
codex-cli 0.153.4 on macOS 26.6, ChatGPT auth. Related: #45894, #25446.
A useful prior art here is Claude Code's new cross-session messaging, which goes beyond agent-team/subagent messaging and allows independent user-started sessions to discover and message one another.
explicit SendMessage between independent sessions;
sender identity and a reply address, so peer-agent traffic is never confused with human input;
if the receiver is active, deliver between tool calls rather than interrupting a running tool;
if the receiver is idle, start a new turn from the message;
per-session inbound controls such as accept / hold / refuse;
local and cross-machine/cloud routing;
a one-shot notify_when_idle subscription: "tell me when session X next becomes idle/exits" without polling or spending model tokens in the watched session.
That last primitive is especially interesting because it overlaps directly with long-running task / monitor workflows:
thread A launches work in thread B
↓
A subscribes to B idle/completion
↓
A sleeps
↓
B completes
↓
one event wakes A
Codex already appears to have much of the lower-level substrate:
codex queue --thread ... --message ...
app-server thread/inject
internal multi-agent protocol variants for sendMessage / listAgents
So the gap may be less "invent messaging" and more productize cross-session messaging as a typed, attributed, routable event primitive.
I would strongly prefer a message/event envelope along the lines of:
In other words, cross-thread messaging and monitor wake should probably converge on the same session inbox / event bus, rather than becoming separate mechanisms.
For safety/UX, sender provenance is essential. A peer agent's message should never inherit the authority of a human user message, and delivery/consumption receipts would avoid another polling loop.
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesenhancementNew feature or requestsubagentIssues involving subagents or multi-agent features
Activity
github-actions commentedon Sep 16, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
abcjhby2871 commentedon Sep 24, 2026
A useful prior art here is Claude Code's new cross-session messaging, which goes beyond agent-team/subagent messaging and allows independent user-started sessions to discover and message one another.
Relevant docs:
https://code.claude.com/docs/en/cross-session-messaging
https://code.claude.com/docs/en/agent-teams
Some semantics worth considering for Codex:
ListAgents);SendMessagebetween independent sessions;notify_when_idlesubscription: "tell me when session X next becomes idle/exits" without polling or spending model tokens in the watched session.That last primitive is especially interesting because it overlaps directly with long-running task / monitor workflows:
Codex already appears to have much of the lower-level substrate:
codex queue --thread ... --message ...thread/injectsendMessage/listAgentsSo the gap may be less "invent messaging" and more productize cross-session messaging as a typed, attributed, routable event primitive.
I would strongly prefer a message/event envelope along the lines of:
This could also become the shared substrate for the remote-monitor proposal in #44855:
In other words, cross-thread messaging and monitor wake should probably converge on the same session inbox / event bus, rather than becoming separate mechanisms.
For safety/UX, sender provenance is essential. A peer agent's message should never inherit the authority of a human user message, and delivery/consumption receipts would avoid another polling loop.