stream disconnected before completion: UTF8 error: invalid utf-8 sequence of 1 bytes from index 0

Resolved 💬 1 comment Opened Nov 19, 2025 by echozyr2001 Closed Jan 31, 2026

What version of Codex is running?

codex-cli 0.58.0

What subscription do you have?

Azure

Which model were you using?

gpt-5.1-codex

What platform is your computer?

macOS arm

What issue are you seeing?

Regardless of the input, after a normal response, it keeps trying to reconnect, then throws the error "stream disconnected before completion: UTF8 error: invalid utf-8 sequence of 1 bytes from index 0".

╭───────────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.58.0)                                 │
│                                                           │
│ model:     openai/gpt-5.1-codex medium   /model to change │
│ directory: ~/CodeFile/node/portfolio                      │
╰───────────────────────────────────────────────────────────╯

  To get started, describe a task or try one of these commands:

  /init - create an AGENTS.md file with instructions for Codex
  /status - show current session configuration
  /approvals - choose what Codex can do without approval
  /model - choose what model and reasoning effort to use
  /review - review any changes and find issues


› hello, how are you


• Hi there! I’m doing well—ready to help whenever you are.

─ Worked for 5s ────────────
• Hey! I’m doing well, thanks for asking. How can I help today?

─ Worked for 8s ───────────

• Hey! I’m here and ready to help—what’s on your mind today?

─ Worked for 12s ───────────

• Doing well, thanks! What can I help you with today?

─ Worked for 24s ───────────

• Hey there! I’m good and ready to help. What can we work on today?

■ stream disconnected before completion: UTF8 error: invalid utf-8 sequence of 1 bytes from index 0

What steps can reproduce the bug?

Uploaded thread: 019a9b4e-7050-7280-b484-1a631863e129

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗