Skip to content

Allow deferring plain-text MCP output in thread item listings - #60390

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5c160b30a4eac2a9b70e3fa65b6dbd83e935338b
Nov 9, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5c160b30a4eac2a9b70e3fa65b6dbd83e935338b

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Allow deferring plain-text MCP output in thread item listings

What changed

Add experimental deferOutput.mcpToolCall support to thread/items/list requests scoped to a turnId. Successful, completed MCP calls with nonempty, unannotated plain-text results can return empty result.content with outputDeferred: true. Clients can retrieve the saved output through thread/items/read; connector identity remains on the listed item.

Keep rich results, JSON or fenced text, app UI results, and built-in codex_app results inline. Preserve plain-text output when creating bounded previews of oversized MCP results so those previews remain eligible for deferral. Reads return the saved preview when output exceeds the 64 KiB history limit.

Testing

Extend thread history integration coverage for independent and combined command/MCP deferral, experimental capability gating, excluded result types, connector identity, oversized previews, and retrieval of deferred items.

## What changed

Add experimental `deferOutput.mcpToolCall` support to `thread/items/list` requests scoped to a `turnId`. Successful, completed MCP calls with nonempty, unannotated plain-text results can return empty `result.content` with `outputDeferred: true`. Clients can retrieve the saved output through `thread/items/read`; connector identity remains on the listed item.

Keep rich results, JSON or fenced text, app UI results, and built-in `codex_app` results inline. Preserve plain-text output when creating bounded previews of oversized MCP results so those previews remain eligible for deferral. Reads return the saved preview when output exceeds the 64 KiB history limit.

## Testing

Extend thread history integration coverage for independent and combined command/MCP deferral, experimental capability gating, excluded result types, connector identity, oversized previews, and retrieval of deferred items.

GitOrigin-RevId: 5c160b30a4eac2a9b70e3fa65b6dbd83e935338b
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/5c160b30a4eac2a9b70e3fa65b6dbd83e935338b branch from 53217e6 to d2b4d63 Compare November 9, 2026 12:54
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-09T12:54:35.862276Z 53217e6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit d2b4d63 into main Nov 9, 2026
7 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/5c160b30a4eac2a9b70e3fa65b6dbd83e935338b branch November 9, 2026 12:54
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant