Files
codex/codex-rs/codex-mcp
jif cc31e374fc Follow MCP tool pagination in legacy protocol mode (#50035)
## Why

Legacy MCP tool discovery discarded pagination cursors, leaving tools on later pages unavailable.

## What changed

Pass `tools/list` pagination cursors to the existing collector in both legacy and modern protocol modes. Legacy discovery now follows subsequent pages and applies the same pagination limits and cursor validation as modern discovery.

## Testing

Extend integration coverage to both protocol modes, checking that tools from later pages reach the model and can be called successfully, while catalogs with oversized cursors are rejected. Update the legacy discovery test to expect an error for a repeated cursor.

GitOrigin-RevId: a6daa8034d2a403c1f2a5846e385789d8a620af7
2026-10-01 17:10:03 +00:00
..