openai / openai/codex

codex exec / app-server: what is the documented way to observe turn completion and capture the final result at run time?

Open
#45,309 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app-server CLI documentation exec
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What is the type of issue?

Documentation is missing

What is the issue?

Context: I operate a compliance-sensitive pipeline that must capture completion evidence at the time a Codex run executes — I cannot rely on post-hoc reads of ~/.codex rollout files, since those are not a guaranteed surface (per maintainer guidance on #45251). So I need the supported, documented way to observe completion at run time when driving Codex non-interactively.

My setup: ChatGPT desktop app (Codex) 26.903.71938 / build 8576, macOS; runs driven via codex exec (noninteractive mode) and/or the app server.

My question: when I drive Codex programmatically, which documented interface tells me, at run time, that a turn is finished — and whether it finished successfully?

Concretely:

Area What I'd like to know
Completion signal Is there a documented event in the codex exec --json event stream (or an app-server notification) that marks a turn as completed?
Success vs failure Is the distinction between "turn completed successfully", "turn failed", and "transport/harness error" documented (event types, exit codes)?
Final result capture Is the final assistant output/result of a completed turn available in that same documented stream, so a consumer can record it at call time?

A pointer to the relevant doc section or schema is a complete answer. If no documented run-time completion signal exists yet, saying so plainly is equally useful — it tells consumers to treat this as a capability gap rather than an undocumented behavior.

Where did you find it?

https://developers.openai.com/codex/app-server
https://developers.openai.com/codex/noninteractive

I looked for run-time completion/streaming semantics in both sections (event types, exit codes, success-vs-failure distinction) and could not find them documented.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked app-server and noninteractive documentation, focusing on the codex exec --json event stream and app-server notifications. Determine whether they document turn completion, success versus failure, exit codes, and final-result capture; document the relevant schema or state plainly that a runtime signal is not yet available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, cli, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.