Skip to content

feat: expose native MCP resource pages and reads - #5597

Merged
markstuart-oai merged 2 commits into
feat/codex-harnessfrom
mark/req573-mcp-resources-python
Nov 7, 2026
Merged

markstuart-oai merged 2 commits into
feat/codex-harnessfrom
mark/req573-mcp-resources-python

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request adds the missing native Session APIs for MCP resource pages and URI reads: list_mcp_resources, list_mcp_resource_templates, and read_mcp_resource. Each list call returns one page and its cursor. Typed results preserve text, blobs and metadata; callers decide whether to include resource contents in a prompt.

The methods reuse native MCP connections and the existing ownership of idle operations. Resource-only servers can use tools=[]; access starts only the requested server. Missing resource capability returns an empty page. Saved resource-only selections resolve against current declarations without granting tools. Cancellation and close join pending native work.

A patch to the pinned native codec preserves fractional resource annotation priorities. Valid replies with those values previously decoded as the wrong result type. Native pins stay fixed. The generated API snapshot includes the additive resource methods and types.

Test plan

  • Full code-change verification passed: formatting, lint, mypy, Pyright, 5,602 parallel tests and 53 serial tests; 250 skips.
  • All 11 resource tests passed across HTTP and stdio, including pagination, capability checks, error recovery, replacement/restore, cancellation and caller-owned results.
  • A forced cp1252 stdin probe preserves the Unicode cursor after the stdio fixture reads UTF-8 JSON bytes. A focused run passed 358 tests across resources, MCP, checkpoint upgrades, write/network policy and A2A.
  • A fresh wheel installation outside the checkout passed native qualification, resource page/read checks, and restore checks for narrowed and fully deselected servers. Codec compatibility and regression probes passed.
  • Both required independent final reviews are clean on the verified source.

Issue number

None linked.

Checks

  • I've added new tests, if relevant
  • I've run the applicable checks in AGENTS.md, including .agents/skills/code-change-verification/scripts/run.sh when required
  • I've confirmed all required local checks pass
  • I've completed the review required by AGENTS.md

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 7, 2026 21:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T22:38:55.219208Z 8d46f1f New commits
🔒 Security Review ✅ Completed 2026-11-07T22:39:29.962126Z 8d46f1f New commits
ℹ️ 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.

@markstuart-oai
markstuart-oai force-pushed the mark/req573-mcp-resources-python branch from 84173f0 to 8230593 Compare November 7, 2026 22:10
@markstuart-oai
markstuart-oai force-pushed the mark/req573-mcp-resources-python branch from 8230593 to 8d46f1f Compare November 7, 2026 22:37
@markstuart-oai
markstuart-oai merged commit db987c7 into feat/codex-harness Nov 7, 2026
29 checks passed
@markstuart-oai
markstuart-oai deleted the mark/req573-mcp-resources-python branch November 7, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants