Skip to content

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

Closed

Description

@luozuyang-go

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.

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    tool-callsIssues related to tool calling
    on Mar 4, 2026
  2. etraut-openai commented on Mar 4, 2026

    @etraut-openai
    Contributor

    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.

  3. luozuyang-go commented on Mar 4, 2026

    @luozuyang-go
    Author

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

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

    CLIIssues related to the Codex CLIbugSomething isn't workingtool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions