mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
## Why MCP catalog discovery must not allow a server to keep pagination running or growing without bounds. ## What changed - Apply the shared pagination collector to tool, resource, and resource-template discovery. - Limit each catalog to 100 pages and 1,024 items, and reject pagination cursors larger than 64 KiB or any repeated cursor. - Bound the entire pagination operation by the configured tool timeout, falling back to 30 seconds when no timeout is configured. ## Testing Add unit coverage for every limit and an end-to-end MCP test that preserves valid multi-page tools while excluding a server that returns an oversized cursor. GitOrigin-RevId: 961a1bfa5fe8a265daf56e342a919c980cd720fa