Skip to content

CLI intermittently halts with {"detail":"Bad Request"} and requires manual resume #34899

Open

Description

@uditgoenka

Summary

For roughly the last two weeks, Codex CLI has intermittently stopped mid-session and displayed only:

■ {"detail":"Bad Request"}

After this appears, the active work pauses instead of recovering or continuing. The failure is random and has occurred repeatedly during otherwise normal CLI use.

Steps to reproduce

  1. Start an interactive Codex CLI session.
  2. Work normally for an extended session, including tool calls and continued turns.
  3. At an unpredictable point, the CLI prints the Bad Request response above.
  4. Observe that the session stops progressing and requires a manual resume/retry or CLI restart.

Because the failure is intermittent, there is no single deterministic command that triggers it.

Expected behavior

  • A transient API-side bad request should either be retried safely or return a useful, actionable error.
  • The CLI should not silently pause the active workflow.
  • Ideally the error should include a request/correlation ID and enough sanitized context to diagnose the rejected request.

Actual behavior

  • The CLI prints only {"detail":"Bad Request"}.
  • Ongoing work stops immediately.
  • No request ID, failing endpoint, validation detail, or recovery guidance is shown.
  • Manual intervention is required to continue.

Frequency / impact

  • Repeated intermittently over approximately two weeks.
  • Causes loss of continuity in long-running tasks and can leave background work waiting without a clear failure state.

Environment

  • Codex CLI: 0.145.0
  • macOS: 26.5.1
  • Architecture: Apple Silicon (arm64)
  • Shell: zsh 5.9

Suggested diagnostics

It would help if the CLI logged a sanitized request ID, response status/body, retry classification, and which request field failed validation—without exposing prompt or repository contents.

No private project data, prompts, credentials, or repository details are included in this report.

Activity

  1. added
    bug
    CLI
    connectivity
    on Jul 23, 2026
  2. gying410 commented on Jul 25, 2026

    @gying410

    I’m seeing the same user-visible error in Codex Desktop on Windows:

    {"detail":"Bad Request"}
    

    A useful trigger pattern from my recent occurrences: it happens while Codex is generating HTML files and while generating/exporting PDF files. I have not yet established whether the underlying cause is output size, rendering/conversion, context compaction, or a particular tool result, so I’m reporting this as an observed correlation rather than a root-cause claim.

    The next time it occurs I can capture the Codex app version, thread/feedback ID, whether the thread was near compaction, output file size, and the exact tool/action immediately before the error. Please let me know if there are other diagnostics that would be most useful.

  3. Begetterz commented on Aug 22, 2026

    @Begetterz

    Observed again on 2026-08-22 in the macOS Codex IDE during a Backend JavaScript/Prisma editing session. The IDE transport returned {"detail":"Bad Request"} after a workspace edit. Git inspection immediately afterward showed a coherent dirty worktree and git diff --check passed; focused tests passed after repairing only one independently detected logic defect. No Undo or batch replay was used.

    Impact: the task required manual continuation despite repository state remaining valid. No credentials, customer data, or repository-specific secrets are included here.

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

    CLIbugconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions