Skip to content

Query a turn's status and final reply without resuming the session #638

Open

Description

@xuanda0201

Summary

Codex records each turn's status and messages, but codex-acp does not expose a read-only way to query one native thread ID and turn ID. session/load restores a session and replays history; it is not a query for one recorded execution.

Why it matters

Our client runs Codex through ACPX. If the connection drops while a task is running, Codex may finish the work while the client misses the result. We still have the thread and turn IDs, but cannot tell whether the task finished or what it replied.

Resending the prompt could run the same commands or file edits again. We only need to read the existing result.

Suggestion

Expose a read-only query for a specific thread ID and turn ID, returning:

  • Whether that turn is running, completed, failed, or interrupted, and its error if any.
  • Its recorded assistant messages, including their IDs, phases and complete text.
  • An explicit not-found result when the thread or turn does not exist.

The query should not load or resume the session, send a prompt, or start any execution. It should also work when the thread is not already loaded by the current ACP connection.

The API shape is open to discussion. Related: #613 proposes broader native session controls; this request is limited to reading one turn.

Checked against codex-acp 2.2.2 source.

Activity

  1. changed the title [-]Add a read-only API to inspect a specific native Codex turn without loading or resuming it[/-] [+]Query a turn's status and final reply without resuming the session[/+] on Oct 16, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions