Skip to content

Feature request: external wake / message injection for an existing Codex Desktop or CLI session #47193

Open

Description

@hydra-zhao

What feature would you like to see?

Please add a supported way for an external local process to wake an existing, currently open Codex Desktop or interactive CLI session and start a new turn in that same conversation.

The core use case is a long-running background watcher (for example, a market/daywatch process, CI monitor, build watcher, alerting service, or local automation) that should be able to do:

external event
  -> existing Codex session/thread
  -> start a new turn automatically
  -> response appears in the already-open Codex UI/CLI conversation

without minute-level polling and without starting a separate session/process that the user has to inspect elsewhere.

Current limitation

Tested on Windows with:

  • Codex Desktop: 0.155.0-alpha.9.2
  • Codex CLI: 0.155.1

The App Server already exposes useful primitives such as thread/read, thread/resume, and turn/start, but an external App Server process cannot take control of a thread that is owned by the running Desktop app.

In a clean idle test:

  • the active turn emitted task_complete
  • an external helper waited ~150 ms
  • thread/read showed all turns completed and no inProgress turns
  • the external thread/resume request was sent ~365 ms after task_complete
  • the thread writer lock still existed
  • thread/resume failed with:
thread <id> already has an active writer

So the Desktop appears to retain writer ownership even while the thread is idle.

At the same time, the Desktop's App Server instance does not expose a supported external listener/control channel that another local process can attach to. That means an external watcher cannot route a new turn/start through the same App Server that already owns the UI thread.

Requested capability

Any one of the following would solve the problem:

  1. Attach to the running Desktop/CLI App Server

    • supported local socket / named pipe / control transport
    • authenticated local connection
    • allows external clients to submit input to an existing thread owned by that App Server
  2. Session inbox / external message API

    • send a message to an existing session/thread
    • if the session is idle, automatically start a new turn
    • surface the new turn and assistant output in the already-open UI/CLI conversation
  3. External wake / trigger API

    • event-driven trigger for an existing thread
    • no polling requirement
    • preserves the current conversation context

Suggested acceptance criteria

  • A Codex Desktop or interactive CLI session is open and idle.
  • A separate local process can send a message/event to that exact existing session.
  • Codex automatically starts a new turn.
  • The new user/event input and assistant response appear in the same currently-open conversation.
  • No second interactive session is created.
  • No minute-level polling is required.
  • The mechanism is documented and supported, including Windows.

Why this matters

Codex already has most of the building blocks for long-running agent workflows, but the missing bridge is external event -> existing UI session.

This would unlock practical always-on automations such as:

  • CI/build alerts
  • market/data watchers
  • log/incident monitors
  • file or repository watchers
  • scheduled/background processes
  • local agent orchestration

while keeping all context and output in the conversation the user is already working in.

Thanks — this would make Codex much more usable as a persistent, event-driven local agent rather than only a request/response tool.

Activity

  1. added
    enhancement
    app
    app-server
    on Sep 22, 2026
  2. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. hydra-zhao commented on Sep 22, 2026

    @hydra-zhao
    Author

    A bit more competitive context: this capability is increasingly becoming table stakes across coding agents, which makes the gap in Codex more noticeable.

    A few concrete examples from current official docs:

    These products use different architectures, and not every example is a local Desktop UI session, so they are not perfectly identical. But the product pattern is clear:

    external event
      -> persistent/existing agent session
      -> automatic wake/new turn
      -> continue with the same conversation context
    

    Codex already has much of the lower-level machinery (turn/start, session/thread persistence, App Server notifications), but the missing bridge into the already-running Desktop/CLI session means users still need polling or a separate process/session for workflows that competitors can make event-driven.

    For long-running local agents, monitors, CI watchers, and background "daywatch" style processes, I think this is now a fairly visible competitive gap rather than a niche feature request.

    A supported local inbox/control transport (named pipe/socket), or an authenticated way to attach to the App Server that already owns the Desktop/CLI thread, would close most of that gap without requiring a major new execution model.

  4. brianpabent commented on Sep 30, 2026

    @brianpabent

    Additional acceptance case for #47193: cold Desktop preparation

    Bazaar delivers a message to the agent context that accepted an invite. We need external input to reach that selected Desktop context with its current native tools and approval handlers, including when its task is unloaded or the app has restarted.

    On 2026-09-23, we compared three entry paths in the same saved task using Desktop 26.915.31945 (build 9922), bundled Codex 0.155.0-alpha.9.2, and our broker 0.12.0:

    1. A real incoming chat message handled by an ordinary cold broker continuation: a callable-tool inventory query filtered for list_artifacts returned [].
    2. A direct Desktop continuation: the inventory exposed mcp__codex_app__list_artifacts, and an invocation completed without error.
    3. Another real incoming chat message after Desktop had prepared the task: the inventory exposed the same tool, and an invocation completed without error.

    These are observed inventory and invocation results, not a full native-tool audit. The cold path did not attempt to invoke the absent tool, and artifact contents were excluded. The result shows a discovery mismatch for this one capability across cold and Desktop-prepared entry paths. It does not establish that every tool is absent, or that a supported Codex API has regressed.

    I rechecked the locally installed codex-cli 0.158.0-alpha.2.1 on 2026-09-30. codex app-server generate-json-schema produced 104 stable client request methods; --experimental produced 167. thread/queue/add appears only in the experimental schema. The stable schema includes thread/resume, turn/start, and thread/inject_items; I found no request that asks the running Desktop client to prepare and admit an external input as its own turn. This is a protocol inventory, not a new live Desktop parity test. The official App Server guide describes client-started turns and client-serviced approval requests, and describes thread/inject_items as appending history without starting a turn.

    The missing supported operation would accept a caller-stable input ID and a host-issued project or task binding, prepare the turn through Desktop's normal path, and return durable acceptance plus the native task ID. It would leave tool handling and approvals with Desktop, expose execution and approval-wait state, reconcile a lost acceptance response by input ID, and retain input while the host is unavailable. The adapter could then use Bazaar's existing durable delivery and work-association contract without copying Desktop permissions or invoking a substitute App Server.

    Is there a supported host-owned ingress that satisfies this cold case? If not, please consider this acceptance case alongside #47193's warm-session external wake request. We can provide a redacted reproducer or run a focused compatibility probe against a proposed API.

  5. dongtianyuan-crypto commented on Oct 13, 2026

    @dongtianyuan-crypto

    Additional acceptance case: authenticated ingress into an existing Desktop-owned conversation

    We are building collaboration between persistent Codex Desktop conversations using a private Slack channel. Each machine has one existing conversation as its representative. A local, non-model receiver should deliver a selected event to that same conversation and observe its result, without a replacement thread or a competing executor.

    Our recorded macOS environment was Desktop 26.930.61225, bundled Codex 0.160.1, and standalone CLI 0.160.0 (observed on 2026-10-11, not a compatibility claim for later releases). Windows conversations also participate, but we are not asserting a current Windows version without matching evidence.

    Desktop-native thread tools and supervised Slack exchanges have worked. Historical local CLI queue tests also produced replies. These observations do not establish an authenticated, ordinary-program interface to the Desktop-owned executor with reliable execution/result correlation. We made no new injection attempt during the latest bounded review. This is a request for supported capability clarification, not a report that a documented API is broken.

    Could you clarify the following contracts, or point to a supported API and minimum version?

    1. Ingress and identity: How can a neutral external caller address one exact Desktop-owned conversation without claiming to be another agent, scanning private sockets, or reading internal databases?
    2. Ownership and lifecycle: What happens when that conversation is idle, busy, not loaded, waiting for approval, or recovering after Desktop restarts? Can this preserve the Desktop's existing tools, sandbox and approval ownership without a second writer?
    3. Correlation: Is there a caller-stable input ID and a durable acceptance receipt that can be mapped to the actual executing turn, rather than treating queue acceptance as model completion?
    4. Observation and recovery: How should an external caller read the final status/output and reconcile a lost submission response without blindly resending? How are pending input, cancellation and user revocation handled?
    5. Cross-platform support: Which authenticated local transport and compatible Desktop/CLI versions support this on macOS and Windows?

    The App Server documentation describes related thread/turn and approval primitives. We have not established that an ordinary process can use them through the running Desktop's authoritative owner. Related request: #40134. We are asking about host-owned admission, including not-loaded conversations, rather than starting a second App Server against the same persisted thread.

    Please identify the supported mechanism, or confirm whether this exact workflow is currently unsupported. We can prepare a separately reviewed redacted reproducer if useful. This comment contains no credentials, conversation identifiers, private channel details or internal database contents.

  6. ysela-c2a commented on Nov 19, 2026

    @ysela-c2a

    Subject: Supported way to wake a specific idle Codex desktop chat

    We have a local task queue and want to deliver one pending item to its assigned idle Codex desktop chat. The desktop integration can list the chat and read its idle status and completed turns. We have not found a supported, authenticated background client that can subscribe to our queue and deliver to that existing desktop-owned chat. Starting a separate app-server does not establish that it controls the same live desktop host.

    Is there a supported integration for this? If not, please route this feature request to the Codex desktop integration team: allow an explicitly authorized client to target one specified host and chat, verify that it is idle, submit one correlated queue item without changing approval settings, and receive turn-start, item-completion and turn-completion receipts. The integration should refuse an active or unknown target and support revocation. On an ambiguous response, the client must avoid duplicate sends.

    No automatic wake has been attempted. We can provide a minimal test plan and environment details privately if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions