SDK does not expose file diffs despite npm docs stating “streaming responses include file diffs”

Resolved 💬 1 comment Opened Oct 28, 2025 by OhadAssulin Closed Nov 9, 2025

What version of Codex is running?

0.50.0

What subscription do you have?

Pro

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 25.0.0 arm64 arm

What issue are you seeing?

Hi Codex team 👋

There seems to be a mismatch between the TypeScript SDK’s documentation and its actual behavior regarding file diffs.

According to the npm package page, runStreamed() is supposed to emit:

“…tool calls, streaming responses, and file diffs.”

However, when inspecting the SDK implementation (see sdk/typescript/src/items.ts), the emitted item for file edits -FileChangeItem — contains only:

export type FileChangeItem = {
  id: string;
  type: "file_change";
  changes: { path: string; kind: "add" | "delete" | "update" }[];
  status: "completed" | "failed";
};

There’s no diff or patch data included.
In practice, runStreamed() yields only this minimal metadata (path/kind/status), so SDK consumers have no access to what actually changed in each file.

This contradicts the documentation and prevents developers from:
• previewing or reviewing Codex’s edits programmatically
• displaying diffs in custom UIs

What steps can reproduce the bug?

Run any Codex command that edits files using runStreamed()

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗