codex - 💡(How to fix) Fix basic_streaming.ts sample does not handle web_search, mcp_tool_call, and error item types

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • error (message field)
RAW_BUFFERClick to expand / collapse

What is the type of issue?

Documentation is missing

What is the issue?

The basic_streaming.ts sample handles agent_message, reasoning, command_execution, file_change, and todo_list — but skips three item types that are defined in items.ts:

  • web_search (query field)
  • mcp_tool_call (server + tool + status fields)
  • error (message field)

A developer copying this sample as a starting point would silently drop these events. Suggested fix: add these cases to handleItemCompleted.

I'm happy to submit a PR if invited.

Where did you find it?

https://github.com/openai/codex/blob/main/sdk/typescript/samples/basic_streaming.ts

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING