Session hangs silently after successful tool_call_output (no final_answer/task_complete)

Resolved 💬 3 comments Opened Mar 4, 2026 by luozuyang-go Closed Mar 4, 2026

I hit a reproducible hang in Codex where a turn stops producing output after a successful tool call.

What happened:
1) Assistant said it was about to write tasks.md.
2) It issued exec_command with a heredoc to write:
openspec/changes/phase-2-backend-conversation-orchestrator/tasks.md
3) The tool call returned successfully:
function_call_output for call_NIdhkoLSQsLfgiP3cbhBtLe8
Process exited with code 0
4) After that, the turn produced no more events:

  • no agent_message
  • no final_answer
  • no task_complete

Stall window:

  • Last successful event: 2026-03-04T13:57:51.468Z
  • Next activity only when I manually interrupted: 2026-03-04T14:12:00.856Z
  • Silent stall duration: ~14 minutes

Important notes:

  • This is NOT caused by my manual interrupt. The interrupt happened much later, after the stall.
  • The target file was fully written and valid.
  • I could continue development afterward; artifacts were intact.
  • No crash report for codex/node in DiagnosticReports at that time.
  • codex-tui.log shows no explicit parse/schema/protocol error for this thread around the stall point.

Expected behavior:
After a successful function_call_output, the turn should always either:

  • continue with assistant output, or
  • terminate with an explicit error/completion event.

Actual behavior:
Turn enters a silent hang state with no output and no completion signal.

Please investigate possible runner/state-machine deadlock or dropped stream event in the post-tool-output finalize path.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗