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
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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 ↗

3 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #12382
  • #12515
  • #12843
  • #12955

Powered by Codex Action

etraut-openai contributor · 5 months ago

If you're able to repro this, please use /feedback to upload the logs and session details, then post the thread ID below. Without session details, we won't be able to investigate this further.

luozuyang-go · 5 months ago

@etraut-openai Got it. I will do it next time it happens.