Event-driven background task callbacks

Open 💬 2 comments Opened Jul 16, 2026 by xyjigsaw
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

Please allow Codex CLI to start a background process and return the session to idle. Waiting should require no model calls or token usage.

When the process exits, Codex should automatically notify and resume the original thread with its exit code and output. If another turn is active, the event can be queued until that turn finishes.

Desired flow:

Start background task → session becomes idle → zero-token waiting → task exits → original thread wakes up → Codex continues automatically

Claude Code references:

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 1 month ago

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

  • #32993

Powered by Codex Action

markgerrard · 1 month ago

The flow described here — idle during wait, zero-token waiting, auto-resume with exit code and output, queue-if-turn-active — exists as a working implementation, currently in production soak. Mechanism discussion (why stock drops the completion today, cited to lines) and implementation status are on the older, deeper-scoped #32188: https://github.com/openai/codex/issues/32188#issuecomment-4998087054. Flagging so subscribers here can follow the main thread.