Files
codex/codex-rs/codex-mcp
jif c550cb3e01 Clean up cancelled MCP elicitation requests (#35836)
## Why

Cancelling an in-flight MCP elicitation could leave its response handler registered in the shared router.

## What changed

- Remove an elicitation from the router when its pending request future is dropped.
- Keep cleanup scoped to the cancelled request so other pending elicitations remain routable.

## Testing

Added a test that cancels one of two pending elicitations, verifies the cancelled request can no longer be resolved, and confirms the other request still completes.

GitOrigin-RevId: 9a10360459f0b39552d9d29a6e1b867c1f09e97d
2026-07-28 22:16:42 +00:00
..