Skip to content

Feature request: Event-driven wake-up when a local process completes #46085

Open

Description

@ysyysy115

Codex Desktop can launch a long-running local process, but after the current turn ends, it cannot subscribe to that process’s completion and resume the associated thread or Goal. The only available workaround is periodic scheduled polling.
This is inefficient for multi-hour ML training, builds, benchmarks, simulations, and deployments. It introduces unnecessary scheduled runs, delayed completion handling, and repeated status checks.
Requested behavior:

  • Register a stable process handle when Codex launches a local command.
  • Associate that process with the current thread and Goal.
  • Keep the model inactive while the process is running.
  • When the process exits, wake the thread exactly once.
  • Resume with the exit code, completion time, and final stdout/stderr.
  • Persist enough metadata to recover after app restart or system sleep.
  • Distinguish normal completion, failure, interruption, and a missing process.
  • Support Windows, macOS, and Linux.
    Current workaround: a scheduled task checks the PID and output artifacts every 30 minutes. This should be an event-driven local-runtime capability rather than time-based polling.
    Claude Code already provides a more natural experience for this workflow by retaining ownership of long-running terminal processes and continuing when they complete.

Activity

  1. added
    enhancement
    app
    session
    on Sep 17, 2026
  2. zycdev commented on Oct 28, 2026

    @zycdev

    For the long ML-training / benchmark / simulation case, there is a usable Linux-specific workaround today: codex-long-jobs (disclosure: I maintain it).

    It launches commands as detached OS jobs with durable lifecycle records, logs, exit code, signal and delivery status. Codex can end the initiating turn; a local worker waits without model polling and then uses supported codex queue functionality to address the original thread after the process terminates, including failure and cancellation. This avoids a 30-minute scheduled status check for jobs started through the skill.

    The tested scope is Codex CLI and VS Code Remote-SSH on Linux, not native macOS/Windows Desktop process subscriptions. It does not integrate with Goal state or guarantee survival of reboot/system sleep. Queue acceptance is also distinguished from successful processing by the agent. If your process is on a Linux host, the README has a one-prompt installation path and a training example; I'd welcome feedback on that workflow. A native cross-platform lifecycle API is still needed.

  3. alexx-ftw commented on Nov 4, 2026

    @alexx-ftw

    For the Linux subset, I maintain codex-wake, an alpha event bridge. A training/build launcher can publish its verified outcome and artifact/log paths, waking the subscribed Codex chat for inspection instead of scheduled model checks. Your launcher still owns the process handle and restart recovery; Wake does not provide a process supervisor or the requested Windows/macOS/native-terminal lifecycle support.

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

    appautomationsenhancementsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions