Repository navigation
Description
Use case
We run Synloq, an open-source multi-agent relay (https://github.com/OBenner/synloq): agent roles live as Codex Desktop threads, bound per-role via project-scope .codex/config.toml. Inter-role messages arrive at a local relay while the target thread is idle.
There is no supported way to deliver a wake signal into an existing visible Desktop thread:
codex queue --thread <uuid> --resumetargets the local daemon/CLI surface; its ownership of Desktop-owned threads is undocumented, and a failed resume can still exit zero, so success is not observable.- The app-server protocol offers
thread/inject_items(history insertion without starting a turn) — not a wake-up.
Requested API surface (minimal)
An authenticated call that, given an exact thread UUID (as shown/owned by Codex Desktop), queues a message into that existing visible thread and reports an explicit outcome: admitted / queued-while-busy / executed / failed-with-reason.
Busy queuing and reconnect semantics at parity with user-typed input would be ideal; a documented "Desktop threads are not addressable" answer is an acceptable fallback signal.
Expected behavior / fallback
The target thread starts a turn with the queued content (or a deterministic busy-queued state), without operator interaction and without spawning a replacement chat. No steering of an active turn is requested — admission only.
What it unblocks
Reactive roles on Codex Desktop: today stored messages sit until the operator manually opens and pings each chat (we observe 30+ minute latencies in our stand). With exact-thread wake, Codex Desktop reaches delivery parity with hosts that expose a prompt API.
We can contribute conformance evidence (timelines, thread ids, admission traces) from our test stand.
Activity
github-actions commentedon Nov 16, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
OBenner commentedon Nov 16, 2026
Follow-up on the observability side of the requested contract, from the perspective of a CLI user who wants to build a wake-up watcher on top of
codex queue(0.169.0-alpha.11.1, Desktop-owned visible thread as the target):codex queueexposes no read verb over the turn lifecycle. Its stdout carries no turnId, so an external process cannot correlate a queued message with the turn it eventually produces. The strongest assertion available from outside is "queue accepted" — exit code 0, plus queue/thread identity in the output. Whether the turn was started, is visible in the Desktop conversation, or has completed cannot be observed programmatically.There is no confirmed Desktop-owned control endpoint for read-only observation. The default app-server control socket (
~/.codex/app-server-control/app-server-control.sock) refuses connections (connect 10061) while Codex Desktop is running, so the app-server appears to be CLI-daemon territory rather than Desktop's. The agent tools that can read thread state (read_thread,wait_threads) are exposed as agent-facing tools inside a Desktop session — not as a Node/CLI API surface.Ask: please provide either (a) a documented, read-only way to observe turn lifecycle from an external process for a thread (accepted → started → visible → completed, correlated by a stable id), or (b) a confirmed Desktop control endpoint with read-only methods. Without one of these, any third-party wake-up automation remains partially blind: it can assert admission, but never outcome — and exit-code-only feedback was explicitly flagged above as insufficient wake-up evidence.
Not requesting steering or write access — read-only observation is enough for a watcher to stop/resume delivery loops.
Nakagawa-master commentedon Nov 16, 2026
The reporter and the existing protocol analysis already establish that queue admission, turn start, Desktop visibility, and completion are different events. There is a further design premise for a reactive multi-agent wake API that is not solved merely by authenticating the caller or returning a turnId:
Knowing exactly which Desktop thread to wake is not the same as having authority to make a new instruction in that thread. An external relay message is a claim/event from another actor, not automatically the Desktop user's own newly typed instruction. Treating the two as interchangeable turns a correct delivery mechanism into a silent authority-escalation path; treating every event as untrusted and forever non-executable, conversely, makes the intended reactive role impossible. The missing unit is a bounded, revocable delegation from this thread's actual owner to this external sender for this kind of work, valid at dispatch time.
Concrete distinction in current public source:
thread/inject_itemsexplicitly appends raw model-visible Responses items without starting a user turn;turn/startis a separate action. These are transcript/control APIs, not by themselves a proof that content delivered by Synloq role B may exercise role A's workspace permissions as if the human had just spoken. This does not claim the current Desktop actually exposes such an insecure wake endpoint.Illustrative H1/H2 with identical relay packet
(thread=T, sender=B, payload='run follow-up X'):codex queueexit must not revive yesterday's authority.Suggested recipient-facing contract: separate (1) origin of the event (human/relay role/source with stable delivery ID), (2) current thread-owner delegation (allowed sender, target thread/workspace, task class, expiry/revocation and effective profile at admission), (3) a single turn-admission decision for that event ID, and (4) the distinct delivery/start/visible/settled observations already requested. Revalidate the delegation against the authoritative current thread binding when dispatching after busy-queue or reconnect; do not infer it from the relay's own project_id or a remembered UUID. When a background event is allowed, surface it explicitly as external delegated input, not indistinguishable human-written text. Preserve the user-approval boundaries for later side-effecting tools.
Discriminators: positive authorized role B + idle/busy/reconnect starts exactly one correctly marked turn; negative revoked grant or changed workspace after queueing cannot execute even with valid sender authentication; negative duplicate delivery does not create another action; negative quoted external content without execution delegation cannot impersonate the user. Nonfit: ordinary user-entered Desktop text needs no external-delegation ceremony, and a truly read-only watcher need only a scoped observation grant, never wake/write permission. This extends rather than repeats the existing valuable transport/turnId review.
Original conceptual sources: Nakagawa Master's Consensus Memory / 合意の記憶 distinguishes historical consent and relational/re-agreement context from a flat event record. His Human-descendant AI Civilization Theory, vol. 16 — asynchronous partition and reconnection distinguishes a restored connection from restored common current state or fresh consent. The application here is source-grounded design reasoning, not a claim of product implementation, tested exploit, or the reporter having adopted these originals.
Implementation bridge — authenticated wake event with a revocable user grant
For a proposed exact-thread wake API, implement caller authentication, enqueue and turn start as distinct operations. The following JavaScript reference core evaluates a host-owned wake grant (not an existing Codex endpoint):
Tests: authorized external agent + exact thread + live scoped event grant → enqueue as externally originated event, never spoof a direct human message; different thread, expired grant, unexpected event kind or changed thread scope revision → deny/reconcile; the already-enqueued event may still be visible after grant revocation as history, but may not retroactively authorize an execution. A real implementation must validate IDs and revisions on the host, atomically enqueue using an event ID/dedup key, prove owner-side visibility and only start a turn under the thread's separate current Goal/permission policy. A returned
turnIdis neither a consumed event nor a completed task. This is implementable decision logic, not Codex Desktop/API deployment.OBenner commentedon Nov 16, 2026
This is the right next cut — delegation is orthogonal to both transport and turn observability, and the H1/H2/H3 framing matches what we see in practice. Mapping from our deployment (multi-agent relay,
codex queuewake):Two residual gaps we accept rather than paper over: (1) after an operator revokes a role, a nudge already sitting in the Desktop queue can still start a turn — it can then only fail loudly at the authenticated inbox read (no foreign execution), but a turn does start; admission-time delegation revalidation on the host side (your H2) is the correct fix, not client memory. (2) A queued reminder currently renders in the Desktop transcript as plain user text with no machine-origin marker; today we mitigate with fixed, content-free reminder text, but an origin label on externally-queued turns would close it properly.
We endorse the four-part contract and the revalidate-at-dispatch rule, and we agree with the nonfit boundary: ordinary typed text needs no ceremony, and a read-only watcher should hold a scoped observation grant, never wake/write permission.
andrei-hasna commentedon Nov 17, 2026
Additional app-server 0.169.0 case for #61773
Variant: CLI/app-server 0.169.0 on macOS arm64, using the vendor-signed native host.
The existing local control socket works in this setup. The missing-control-channel case described in #47193 is therefore different from the remaining gaps here.
Two capabilities would help:
A trusted, explicitly enabled post-load callback for a persistent root after daemon recovery or a cold resume publishes it as loaded. A plugin MCP receiver otherwise has no thread binding until a native tool call occurs. In the inspected 0.169 source, pending SessionStart work depends on a later turn context. The callback should run once per runtime generation without starting inference, loading other threads or draining unrelated notices. This cold path was source-audited; no live restart experiment is claimed.
Guarded admission for an untrusted external event. An isolated controller fixture reproduces an active-to-idle interleaving: the activity check sees an active turn, that turn finishes, then the controller submits typed peer output through thread/inject_items. The 0.169 source permits history-only insertion when no active turn remains, so a successful response does not establish that attention will run.
Could a supported API provide an authoritative accepted, deferred or failed result, bound to the exact thread/runtime generation and a stable event identity? It should preserve peer-data classification, check current interruption, receiving intent, provider, usage and budget holds atomically, and support deduplication/readback after an ambiguous response. Explicit pauses must remain effective.
Please confirm whether existing supported surfaces cover these cases, or whether they require a native lifecycle/admission extension. These observations are pinned to 0.169.0 and make no claim about later releases.
OBenner commentedon Nov 17, 2026
Thanks for the lifecycle angle — this is exactly the territory our stand hit this week. Live evidence from our windows (Codex Desktop 0.169.0-alpha.11.1, relay-driven roles):
Cold-resume binding (your point 1): confirmed by us. codex queue --thread returns accepted with a recognized queueId even for an unloaded chat — but no turn starts. Our watcher therefore treats queue acceptance as "nudge only" and never as delivery; the authoritative delivery signal is the role's own MCP read/ack against the relay, not the CLI exit code. A trusted post-load callback would close this cleanly; today the only workaround is operator-visible cold start.
Admission interleaving (your point 2): our busy probe showed queue → wait for terminal of the active turn → exactly one new turn, with no steering. That does not cover the check-then-inject race you describe; we endorse the requested authoritative admission result (accepted / deferred / failed), bound to thread + runtime generation + stable event identity.
Dedup/readback: our nudge ledger is a concrete shape of that: per-message identity, bounded iterations (5), 30-minute cooldown, crash-safe single-owner, durable across restarts — so a duplicate event cannot create a second action, and an ambiguous CLI response never resets the attempt budget. Happy to share the contract if useful.
Two gaps we record rather than paper over: unloaded chats may never wake (your point 1), and queue success must never be reported as turn start (your point 2).
AreChen commentedon Nov 20, 2026
Adding a Windows datapoint from a project we maintain, a third-party message relay with user-authorized bindings to specific Codex Desktop Local threads. The full reproduction is in #62712.
26.1111.2228.0(bundled CLI0.169.0-alpha.11.1). We could discover the owner of the selected Local thread and subscribe to its v13 follower state through\\.\pipe\codex-ipc.26.1117.3838.0(bundled CLI0.171.0-alpha.13) on Windows 11 x64, build 26300. After a full quit and normal relaunch with a Local thread open, the named pipe is still absent. Delivery fails before the follower handshake. Messages remain in our local inbox awaiting delivery to Codex.Could a maintainer confirm whether the Windows listener was intentionally retired? If it was a regression, we'd appreciate a fix or a pointer to a build that restores it. If it was retired, could you point us to a supported replacement or workaround on current Windows builds?
Our minimum need is to wake one existing, explicitly authorized Desktop-owned Local thread so it can read its own inbox. Codex Desktop and the relay should be able to launch normally and independently. We're happy to send a content-free nudge, let the host's normal permissions apply, and confirm delivery only once the recipient actually reads and acknowledges the message. If
codex queue --thread … --resumeis the intended route, could you clarify whether it supports Desktop-owned Local threads in this Windows build, including unloaded threads, and how to distinguish queue acceptance from the target actually starting a turn?ggl003614-tech commentedon Nov 21, 2026
Adding a hardware use case that needs the same contract, plus two more operations.
We build SUDO, a wired USB desktop controller for coding agents. Its local driver acts on Desktop-owned threads at the user's request, on the user's own machine. Since
26.1117removedcodex-ipcon Windows (#62712) it has no supported path either.On the delegation point raised above: for a physical controller the authority question has a simple answer. Every action is a deliberate key press by the operator who is sitting at the machine, so the driver is relaying the operator's own instruction, not a claim from another actor. What it needs from Desktop is the exact-thread binding and typed outcomes, the same as the wake-up case.
Beyond "send to an exact thread", a controller also needs:
The full list and some possible shapes are in #62919. If the wake-up API here ends up as a caller-bound local channel, these three would fit the same channel.
jkaster commentedon Nov 28, 2026
Sonde has a concrete acceptance test for authenticated exact-thread wake. A user grants a local background integration access to one already-open, signed-in Codex Desktop thread. An authenticated peer event wakes that idle thread through its current owner. Reconnecting the integration preserves thread identity, and replaying the same delivery ID does not create another turn. The integration keeps its own durable peer acknowledgment. No Desktop restart, second thread writer, or new sign-in is involved.
Could maintainers confirm the supported attach-and-deliver route, or whether this is the same API request as #61734? A documented minimal request and response for bind and idle wake would let us implement and verify the Sonde adapter.
Sonde readback update: the Mac CLI accepted a single canary from an independent process using codex queue with the exact UUID of an already-loaded Desktop chat and without --resume. The prior turn finished, the canary appeared as the next user turn in that same chat, and the assistant returned the expected unique marker. No restart, sign-in, or writer transfer occurred. This establishes delivery in the loaded-chat case. Could maintainers confirm whether this queue path is supported for third-party background integrations and how to correlate a queued event with its eventual turn without introducing duplicate turns on reconnect? The observed CLI response carries a queue ID, while the resulting input arrived as user text. Sonde needs a host-scoped trust and acknowledgment contract before using the path for arbitrary inbound peer messages.
jkaster commentedon Nov 28, 2026
Update from the live integration test. A bounded local notification delivered with the installed
codex queue --thread <uuid> --message <fixed notice>command entered the exact already-open signed-in Desktop chat, without--resume, a second writer, a restart, or a login. A signed receipt for the underlying peer message was verified separately. Queue acceptance is not evidence that the turn ran.The remaining integration gap is attaching a separately configured MCP entry to that existing chat.
codex mcp listsees the saved enabled entry, while the running chat tool catalog still shows only the original entry. The installed app-server schema declaresconfig/mcpServer/reload, but its documented control socket was unavailable for the Desktop-owned session.Is there a supported Desktop-owned, caller-authorized API to reload one MCP entry for one existing thread and report the resulting tool catalog? A scoped operation with typed unavailable and denied outcomes would let the wake remain a fixed notice and keep privileged actions behind the MCP entry’s own authorization. Related: #61734.
Krushangra commentedon Nov 28, 2026
Please include retry-safe delivery of a tool result in the exact-thread wake API requested here. The use case is a background worker returning a result to the local Windows Desktop chat that started it. The owner may already be working on something else in that chat when the worker finishes.
We tested Windows Desktop
26.1120.6357.0and its bundled Codex CLI0.171.0-alpha.13.2. In a disposable app-server profile with a loopback model, we observed:turn/startduring an active owner turn returned that same turn ID. The result entered the owner's turn.clientUserMessageId. The host allocated a second queue ID and ran a second continuation. The model request count went from two (owner plus first return) to three. Both user messages were present after restart. As a control, stopping the host with one pending submission and reopening the thread delivered that single submission once.Requested contract: Let an explicitly authorized integration submit a typed tool result and stable delivery ID to the host that owns one existing local Desktop thread. Persist the receipt, signal the host on arrival, and admit the continuation through the native idle scheduler. A retry with the same ID and payload should return its existing admission state and turn ID. Conflicting content under that ID should be rejected. Preserve the binding across a closed chat or host restart, including a crash after admission and before acknowledgement. The result should retain tool provenance in the transcript.
The acceptance test is to race a human send against delivery, replay the receipt after losing its acknowledgement, and reopen the original chat. There should be one tool result and one continuation, zero input added to the human's active turn, and no polling, window activation, or global notification changes. Related requests cover attributed queue input in #54991 and queue recovery in #63230.
z3ro2zed commentedon Nov 30, 2026
Additional macOS compatibility datapoint from a local quota-recovery utility (Codex Keeper). On Desktop 26.1120.50957 with bundled CLI 0.171.0-alpha.13.2 (macOS 15.7.2, arm64), the legacy Desktop IPC socket refused connections and independent
thread/resumereturned -32600,already has an active writer.In a disposable, explicitly authorized, already-loaded Desktop thread,
codex queue --thread <id> --message <test>without--resumestarted and completed a new turn both while the thread was selected and after switching away. A patched Swift transport usingthread/queue/addalso completed a real model turn without restarting Desktop or transferring the writer. The rollout recordedturn_attribution.turn_trigger = "queue"and a normal completion. This is evidence for the loaded-thread case, not a guarantee for unloaded threads or an end-to-end quota-recovery scheduler test.Separately, in an isolated two-app-server fixture, submitting identical input twice with the same
clientUserMessageIdproduced two different queue IDs. This independently corroborates the retry-safety concern already raised here. Queue admission alone is not turn startup, and matching rollout text is only a heuristic; a documented, idempotent receipt-to-turn correlation would help local user-authorized integrations avoid duplicate execution after ambiguous delivery.Keeper-specific compatibility report: OM-KEN/Codex-Keeper#5