{"record":{"id":"96bd21e81db77ec5","repo":"openai/codex","slug":"method-returned-a-repeated-pagination-cursor","errorCode":null,"errorMessage":"{method} returned a repeated pagination cursor","messagePattern":"(.+?) returned a repeated pagination cursor","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/codex-mcp/src/pagination.rs","lineNumber":70,"sourceCode":"            });\n            let (items, next_cursor) = fetch(params).await?;\n            if items.len() > max_items.saturating_sub(collected.len()) {\n                return Err(anyhow!(\n                    \"{method} exceeded the catalog limit of {max_items} items\"\n                ));\n            }\n            collected.extend(items);\n\n            let Some(next_cursor) = next_cursor else {\n                return Ok(collected);\n            };\n            if next_cursor.len() > MAX_MCP_PAGINATION_CURSOR_BYTES {\n                return Err(anyhow!(\n                    \"{method} returned a pagination cursor exceeding {MAX_MCP_PAGINATION_CURSOR_BYTES} bytes\"\n                ));\n            }\n            if !seen_cursors.insert(next_cursor.clone()) {\n                return Err(anyhow!(\"{method} returned a repeated pagination cursor\"));\n            }\n            cursor = Some(next_cursor);\n        }\n    };\n\n    let timeout = overall_timeout.unwrap_or(DEFAULT_MCP_PAGINATION_TIMEOUT);\n    tokio::time::timeout(timeout, collect)\n        .await\n        .map_err(|_| anyhow!(\"{method} pagination timed out after {timeout:?}\"))?\n}\n\n#[cfg(test)]\n#[path = \"pagination_tests.rs\"]\nmod tests;\n","sourceCodeStart":52,"sourceCodeEnd":85,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/codex-mcp/src/pagination.rs#L52-L85","documentation":"Error \"{method} returned a repeated pagination cursor\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/codex-mcp/src/pagination.rs:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the MCP server's pagination so cursors advance; a repeated cursor indicates a server-side pagination bug."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}