Skip to content

app-server can finalize an identical progress message before promised tool work starts #36679

Open

Description

@Boulea7

What version of Codex CLI is running?

The affected app-server session reported 0.145.0-alpha.30. My currently installed local CLI is 0.144.1.

What subscription do you have?

Pro

Which model were you using?

gpt-5.6-sol, reasoning effort xhigh

What platform is your computer?

Linux, through an app-server v2 integration

What issue are you seeing?

Codex can turn a nonterminal progress message into a final_answer, mark the turn successful, and return to idle before performing any of the work promised by that message.

In two observed turns in the same session:

  • the assistant first emitted a short commentary message such as “I’ll inspect the relevant documentation and task configuration first”;
  • the exact same text was then emitted again with phase=final_answer;
  • no tool call occurred in either turn;
  • the turn completed successfully after 12–13 seconds, the app-server became idle, and the process exited with code 0;
  • sending a follow-up resumed the session, but the promised investigation had not happened.

This is more than a duplicate-rendering problem: downstream app-server clients correctly treat final_answer plus successful turn completion as terminal, so the actual requested work is silently skipped.

Sanitized event shape:

agent_message  phase=commentary   text="I'll inspect the relevant sources first..."
message        phase=commentary   text="I'll inspect the relevant sources first..."
agent_message  phase=final_answer text="I'll inspect the relevant sources first..."
message        phase=final_answer text="I'll inspect the relevant sources first..."
task_complete  last_agent_message="I'll inspect the relevant sources first..."

There was no pending approval, tool error, transport interruption, or context-window exhaustion. The input occupied roughly one quarter of the available context, and the same session had completed a tool-heavy turn a few minutes earlier.

This appears related to #27352, which tracks premature turn completion after progress messages, and #15633, which tracks identical commentary/final text. The distinguishing symptom here is their combination: the duplicate final_answer is accepted as a successful terminal response and prevents the promised tool work from starting.

What steps can reproduce the bug?

The issue is intermittent, but the observed pattern was:

  1. Resume a long-lived app-server session that has recently completed normal tool-heavy work.
  2. Ask for a multi-step investigation that clearly requires tool calls.
  3. Codex emits a future-intent progress update in commentary.
  4. Observe the same text emitted as final_answer without an intervening tool call.
  5. Observe the turn complete successfully and the session return to idle.
  6. Send a follow-up such as continue; the session remains usable and work can proceed.

What is the expected behavior?

A message that only announces future work should not be accepted as the terminal answer for the same turn. Codex should either continue to the promised tool/action sequence, emit a concrete blocking explanation, or produce a substantive final answer.

A useful regression test would feed the agent loop identical commentary and final-answer items whose text expresses a pending action, with no tool call or blocker, and assert that the turn does not silently complete as successful.

Additional information

This report intentionally omits organization names, workspace/project names, internal URLs, prompts, conversation/run/device identifiers, credentials, and raw private logs. Sanitized rollout excerpts can be provided privately if maintainers need them.

Activity

  1. added
    bug
    app-server
    on Aug 3, 2026
  2. aldi949 commented on Oct 9, 2026

    @aldi949

    @Boulea7 this is a really clean example of why final_answer and task_complete shouldn’t be treated as proof that work happened.
    In your trace, the system successfully terminates on the exact same progress text before the promised tool work even starts.
    I’m testing the opposite rule: no completion without independent evidence for the required action/state.
    Your event shape would be a very useful minimal repro for that distinction.

  3. mcagnion commented on Oct 24, 2026

    @mcagnion

    I observed a related failure in Codex Desktop on Windows on 24 October 2026.
    The rollout reports runtime 0.164.0-alpha.11.1, model gpt-5.6-terra, and
    reasoning effort medium.

    The historical sequence was:

    1. The assistant selected an already-authorized wait_threads action as its
      next step.
    2. It ended the turn without invoking that wait.
    3. After I pointed out the missing invocation, real native wait_threads
      calls ran and followed the other chat's progress.

    This establishes that the selected action was available but skipped. It is
    not a deterministic reproducer, and I have not established identical
    commentary/final text in this case or a shared root cause with this issue.
    The earlier delivery of a bounded worker task was legitimate; the failure
    was the later selected-but-unexecuted wait. Blocking every worker handoff
    would therefore be incorrect.

    Static inspection later that day of Windows package 26.1021.3705.0
    (internal Electron package 26.1021.31345) located the tool relay and
    conversation-event handlers. The wait dispatcher listens for caller-turn
    completion and new input. When execution state is known, it refuses a wait
    whose caller turn is no longer active. This constrains a possible recovery:
    issuing a synthetic tool request against an already-finished turn is not a
    validated way to resume the missing action. These are code observations,
    not proof that this path caused the omission.

    An isolated app-server Stop experiment did produce a continuation and a
    real test-tool callback, but a final assistant item had already been emitted
    before Stop. It does not prove interception before UI display. A separate
    temporary Desktop observation captured no matching hook receipts despite
    real wait calls; hook coverage there remains unknown. No permanent fix was
    installed.

    For an explicit, host-authorized workflow choice, I suggest regression
    coverage for the selection, execution and publication boundary:

    • A selected wait cannot become workflow success without its actual
      invocation and observed state; an active wait remains in progress.
    • The exact target, caller lifetime, cancellation and permission boundaries
      remain enforced. User stop must not trigger automatic resumption.
    • Final-result publication is checked as well as tool execution order;
      starting the wait after displaying a premature final does not pass.
    • Legitimate bounded delivery still completes normally. Missing evidence
      or an error must not be converted into success.

    The invariant should rely on an explicit action contract and executor
    evidence, rather than interpreting arbitrary future-tense prose. Could this
    boundary be covered in a regression test that includes caller-turn lifetime
    and final-message visibility?

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

    app-serverbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions