Skip to content

bug(cli): hide internal SSE parser stack trace on parse errors #358

Closed

Description

@Suyash-K

What version of Codex is running?

Latest

Which model were you using?

o4-mini, gpt-4o

What platform is your computer?

Windows

What steps can reproduce the bug?

Describe the bug
When an SSE parsing error occurs (e.g. insufficient_quota), the CLI prints the raw bundled code around NEWLINE_REGEXP… (dist/cli.js:449), which is noise and not actionable for end users.

To Reproduce

  1. Install the latest @openai/codex CLI on Windows/macOS/Linux.
  2. Trigger a quota error (e.g., exhaust your plan).
  3. Observe the console: you’ll see the low‑level parser code before the error message.

Image

What is the expected behavior?

Expected Behavior

Only a concise system warning should appear instead of confusing and unactionable messages

What do you see instead?

No response

Additional information

No response

Activity

  1. added
    bug
    on Apr 18, 2025
  2. Suyash-K commented on Apr 18, 2025

    @Suyash-K
    ContributorAuthor

    Proposed Fix

    Wrap the for await (const event of stream) loop in codex-cli/src/utils/agent/agent-loop.ts with a try/catch that intercepts errors matching /NEWLINE_REGEXP/, emits a user-friendly message via this.onItem(...), and returns early.

  3. added a commit that references this issue on Apr 19, 2025
    b37b257
  4. added a commit that references this issue on Apr 21, 2025
    bad131c
  5. added a commit that references this issue on Apr 24, 2025
    780e475
  6. added a commit that references this issue on Jun 26, 2025
    bf78cc5
  7. added a commit that references this issue on Sep 5, 2025
    b7f0823
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions