Files
codex/codex-rs/app-server/src
liame-oai 014489466a Add optional MCP disablement for prediction forks and samples (#55463)
## What changed

Add `experimentalDisablePredictionMcp` to `thread/fork` and `disableMcp` to `thread/sample`. Disable MCP servers when requested and the inherited history contains incremental tools on Responses Lite. The fork option requires `experimentalPredictionMode: true`.

Apply disablement through a thread-local policy that excludes configured MCP servers and runtime contributions, including after MCP refresh. Preserve the inherited history prefix and append tool-removal instructions without changing the parent's tools.

## Testing

Add coverage for prediction forks with legacy and paginated history, flag validation, conditional disablement, MCP refresh, and sample/fork request parity. Add a request-history snapshot covering preserved history, tool removal across child turns, and unchanged parent tools.

GitOrigin-RevId: e31d602480e6550ed130d8152f538b8668280fa0
2026-10-20 05:25:43 +00:00
..