basic_streaming.ts sample does not handle web_search, mcp_tool_call, and error item types

Open Beginner friendly
#23,918 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
documentation

Research direction

Open sdk/typescript/samples/basic_streaming.ts and inspect handleItemCompleted, then compare it with the item definitions in items.ts. Add visible handling for web_search, mcp_tool_call, and error items using their documented fields, and verify that the sample no longer silently drops any defined item type.

Written by the indexing model from the issue text.

Description

app-server documentation
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

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.