Skip to content

Codex app-server can stall after the last current-turn item completes without turn/completed #82171

@funmerlin

Description

@funmerlin

Summary

Codex app-server turns can still get stuck until the long terminal watchdog when the last current-turn item/completed notification is not followed by turn/completed, even though current OpenClaw releases some adjacent silent-turn cases.

Current behavior

Current origin/main already covers two nearby cases in extensions/codex/src/app-server/run-attempt.ts:

  • the short completion watchdog stays armed across tracked OpenClaw dynamic-tool completion bookkeeping
  • completed assistant agentMessage items can release the turn through the assistant-completion watchdog

But the short completion watchdog is still disarmed on a broader class of current-turn item/completed notifications when:

  • the turn completion watchdog is armed
  • the completed item is the last active current-turn item
  • the notification is not a tracked OpenClaw dynamic-tool completion
  • no turn/completed follows

That leaves the run waiting for the long terminal watchdog instead of failing fast and releasing the session lane.

Why this matters

In visible chat lanes, this leaves the session in processing longer than necessary and can delay or suppress practical recovery after the model/app-server goes quiet immediately after its last current-turn item.

Reproduction shape

A minimal repro shape is:

  1. start a turn
  2. send item/started for a current-turn item
  3. send item/completed for that same item
  4. do not send turn/completed
  5. observe that the run should time out on the short completion watchdog, not only on the long terminal watchdog

This is distinct from:

  • the already-fixed tracked OpenClaw dynamic-tool bookkeeping case
  • the already-fixed completed assistant agentMessage release path
  • the intentionally-unreleased raw assistant response item case

Suggested direction

Extend the silent-turn handling so the short completion watchdog stays armed, or is re-armed from the final current-turn completion, for the remaining non-assistant last-item-completed stall case.

A focused regression test around "last current-turn item completed, then silence" would lock the behavior down.

Notes

This report intentionally omits private environment details and uses a reduced reproduction shape only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions