You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Install the latest @openai/codex CLI on Windows/macOS/Linux.
Trigger a quota error (e.g., exhaust your plan).
Observe the console: you’ll see the low‑level parser code before the error message.
What is the expected behavior?
Expected Behavior
Only a concise system warning should appear instead of confusing and unactionable messages
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.
Activity
Suyash-K commentedon Apr 18, 2025
Proposed Fix
Wrap the
for await (const event of stream)loop incodex-cli/src/utils/agent/agent-loop.tswith a try/catch that intercepts errors matching/NEWLINE_REGEXP/, emits a user-friendly message viathis.onItem(...), and returns early.gracefully handle SSE parse errors and suppress raw parser code (open…
gracefully handle SSE parse errors and suppress raw parser code (open…
gracefully handle SSE parse errors and suppress raw parser code (open…
gracefully handle SSE parse errors and suppress raw parser code (open…
gracefully handle SSE parse errors and suppress raw parser code (open…