Stream disconnected before completion: Transport error: network error: error decoding response body

Open 💬 10 comments Opened Jan 27, 2026 by shermju
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.92.0

What subscription do you have?

PRO

Which model were you using?

5.2 Codex

What platform is your computer?

Darwin 25.2.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

VSCode

What issue are you seeing?

Reconnecting... 1/5 (1h 31m 00s • esc to interrupt) └ Stream disconnected before completion: Transport error: network error: error decoding response body

What steps can reproduce the bug?

Run a workflow for an extended period of time.

What is the expected behavior?

Not to do this?

Additional information

Reconnecting... 1/5 (1h 31m 00s • esc to interrupt) └ Stream disconnected before completion: Transport error: network error: error decoding response body

View original on GitHub ↗

10 Comments

github-actions[bot] contributor · 5 months ago

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

  • #8465
  • #8351
  • #9872
  • #8775
  • #8294

Powered by Codex Action

etraut-openai contributor · 5 months ago

Please use the /feedback slash command to upload your logs and session details, then post your thread ID here.

MisterRound · 5 months ago

This sounds similar to my issue, the TLDR was prompts that create large output tokens seem to break streaming as of current. If you can break your prompt into separate individual calls that generate smaller outputs it will likely work, or refactor to require smaller output size. I spent a ton of time dealing with this and it turned out to be 100% the number of output tokens it was trying to create.

ahmedelami · 5 months ago

This worked for me:

The issue was a stale, cached authentication session in the local config (it was prioritizing an old/limited API Org instead of my ChatGPT subscription).

  1. Kill lingering processes and remove the cached auth file:
pkill -f codex
rm ~/.codex/auth.json
  1. Start fresh (forcing no env vars to ensure a clean login):
env -u OPENAI_API_KEY -u OPENAI_ORGANIZATION codex
  1. Select "Sign in with ChatGPT" when prompted.

Lmk if it also works for you or helps?

shermju · 5 months ago

I've only ever been signed in on this account. Never utilized codex without a subscription.

swordfish444 contributor · 5 months ago

@etraut-openai This is the same error string/title as #9872 ("stream disconnected before completion: Transport error: network error: error decoding response body").

If you’re trying to reduce duplicates/noise, I think this can be closed as a duplicate of #9872 so reports/repros stay centralized.

etraut-openai contributor · 5 months ago

This is a very generic error, and there can be multiple causes. I'd like to keep this issue open until I have some logs to look at.

@papasherms, are you still seeing this? If so, please upload your logs using /feedback and post the thread ID here. Without logs, there's not much I can do to diagnose your issue.

shermju · 5 months ago

@etraut-openai Thread ID: 019c05c0-0c2a-7731-935e-15c75c883627

shermju · 5 months ago

I also just noticed another bug where if I drag an image to the CLI it puts the image the message input for all open CLI agents that are running...

etraut-openai contributor · 5 months ago

@papasherms, I don't see any evidence of a transport error in the logs you uploaded. Did you repro the problem immediately before uploading those logs?