Skip to content

Clean up cancelled MCP elicitation requests - #35836

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9a10360459f0b39552d9d29a6e1b867c1f09e97d
Jul 28, 2026
Merged

Clean up cancelled MCP elicitation requests#35836
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9a10360459f0b39552d9d29a6e1b867c1f09e97d

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 28, 2026

Copy link
Copy Markdown

Clean up cancelled MCP elicitation requests

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.

## 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
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/9a10360459f0b39552d9d29a6e1b867c1f09e97d branch from 89a30f7 to c550cb3 Compare July 28, 2026 22:17
@copyberry
copyberry Bot merged commit c550cb3 into main Jul 28, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/9a10360459f0b39552d9d29a6e1b867c1f09e97d branch July 28, 2026 22:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants