Skip to content

Codex CLI requests consistently cut off at ~150s (stream disconnected); please increase or make timeout configurable #3478

@PoseidonLi0514

Description

@PoseidonLi0514

What version of Codex is running?

codex-cli 0.33.0

Which model were you using?

gpt-5

What platform is your computer?

Linux 6.14.0-1011-aws x86_64 x86_64

What steps can reproduce the bug?

Summary:
Codex CLI requests are consistently cut off at around 150 seconds, which makes it difficult to complete complex coding tasks that require longer reasoning and multi-file edits. The stream terminates with the error shown below. The VS Code extension seems to allow a longer timeout and often completes the same tasks, but the exact duration is unclear.


Steps to Reproduce

  1. Open Codex CLI and start a session with streaming enabled.
  2. Ask Codex to implement a complex, multi-file refactor or generate substantial code with tests (e.g., multi-step agent flow that applies patches and explains changes).
  3. Let the model think and stream for a while without interrupting.

After approximately 150 seconds, the stream stops and the CLI reports an error.

Error message

stream error: stream disconnected before completion: Transport error: error decoding response body

What is the expected behavior?

  • Long-running requests should be allowed to finish streaming if the model is still producing output.
  • The timeout should be longer by default (e.g., 5–10 minutes), or at least configurable via a flag or environment variable.
  • The timeout value should be consistent (or clearly documented) across the CLI and the VS Code extension.

What do you see instead?

  • Requests consistently terminate near 150s with a transport/stream decoding error.
  • Complex tasks (long reasoning, multi-file patches) fail to complete in the CLI.

Additional information

  • Network is stable; this occurs across multiple sessions and prompts.

Impact

  • High: Complex refactors, larger code generation, and longer reasoning sessions regularly fail in CLI usage.
  • This forces users to split work into many smaller prompts or switch tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions