t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Codex reports Stop completed when an acknowledged interrupt never ends the turn

Open nima20002000 opened this issue 3 weeks ago • 0 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Code-derived reproduction, not executed:

  1. Start a Codex turn using a protocol fixture that emits the normal turn-start notification.
  2. Configure turn/interrupt to acknowledge immediately, while leaving the native turn running and withholding its terminal notification.
  3. Use a turn with no descendants, tracked command processes, or pending tool cleanup, so those operations do not extend Stop.
  4. Request Stop and allow the adapter’s 10-second terminal-confirmation wait to expire.

Expected behavior

An acknowledged interrupt without turn completion should leave Stop pending, mark the agent unresponsive after the timeout, and offer Force stop.

Actual behavior

The adapter logs its interrupt-timeout warning, then synthesizes an interrupted terminal update for the still-active turn. It returns successfully without terminating the provider runtime. This completes before the session manager’s 15-second interrupt timeout, so that timeout does not produce the error used to mark Stop unresponsive.

Impact

Minor bug or occasional failure

Under this failure condition, the application reports interruption without confirmation that native execution stopped, and the Stop banner does not offer Force stop. It needs a provider that doesn't confirm the stop (or the timing described above), so it is occasional rather than constant.

Version or commit

main @ 9e85538535

Environment

Codex app-server adapter; controlled protocol fixture. Runtime environment not tested.

Where


Found by reading the code while porting the Stop / Force stop changes (6b1245cced, 5f2c27e706) into a fork. Derived from the code at 9e85538535; not reproduced at runtime.

nima20002000 avatar Nov 04 '26 16:11 nima20002000