Skip to content

Codex CLI stream disconnects when running hatch-pet imagen workflow #22089

Open

Description

@Douglas-Strey

What version of Codex CLI is running?

codex-cli 0.130.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5-medium and gpt-5.5-low

What platform is your computer?

Darwin 25.4.0 arm64 arm

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

Ghostty

What issue are you seeing?

Codex CLI repeatedly disconnects during a hatch-pet workflow when it reaches the imagen/image generation step.

The CLI works normally for file inspection, manifest validation, and Python helper execution, but when the workflow tries to generate the base image using imagen, the stream disconnects before completion.

Error shown:

Falling back from WebSockets to HTTPS transport.
Stream disconnected before completion: An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists.

This reproduced multiple times.

What steps can reproduce the bug?

  1. Run Codex CLI in a hatch-pet project.
  2. Use an existing run directory:
    /Users/douglasstrey/.codex/pet-runs/pikachu
  3. Ask Codex to inspect the hatch-pet run without generating images.
  4. Codex successfully validates the manifest and reports:
    • 10 total jobs
    • 0 completed
    • 1 ready: base
    • 9 blocked
    • blocked because decoded/base.png and references/canonical-base.png are missing
  5. Ask Codex to generate only the base image using imagen.
  6. The stream disconnects during the image generation step.

I also tested:

  • codex logout / codex login
  • brew update && brew upgrade --cask codex
  • gpt-5.5-medium
  • gpt-5.5-low
  • --full-auto
  • short prompts with minimal output
  • no VPN/proxy
  • ISP confirmed there are no routing/interruption issues

What is the expected behavior?

Codex CLI should complete the imagen/image generation step, save/register the generated base image, and continue without disconnecting the stream.

Additional information

Request IDs:

  • cb880c76-de63-4c68-a73c-6ad8472af0dc
  • 5f150610-a7ad-4b39-af1c-e09c57069db4
  • 09c99e6c-9b9a-47f1-9f01-68c8f9de0ad7
  • 9ee31f27-2999-42ab-82a2-c287a15023aa

The issue seems isolated to imagen/tool execution:

  • Inspecting files works
  • Reading manifest works
  • Running Python helper scripts works
  • Short responses work
  • The disconnect happens when Codex tries to generate the image

A manual workaround suggested by Codex was to generate the base image outside Codex and then register it manually with:

python3 /Users/douglasstrey/.codex/skills/hatch-pet/scripts/record_imagen_result.py
--run-dir /Users/douglasstrey/.codex/pet-runs/pikachu
--job-id base
--source /ABS/PATH/TO/generated-base.png

Activity

  1. added
    CLIIssues related to the Codex CLI
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on May 11, 2026
  2. github-actions commented on May 11, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

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 workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)imagenpets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions