codex/codex-rs/exec
vkg-oai a083a1e49e Distinguish MCP approval cancellation reasons (#54679)
## Why

MCP tool calls reported every aborted approval as "user cancelled MCP tool call", including interrupted requests and automatic cancellations in `exec` mode.

## What changed

Carry `user`, `interrupted`, or `non_interactive` cancellation reasons through MCP approval metadata and resolution. Mark explicit TUI cancellations as user actions, interrupted requests as interruptions, and automatic `exec` cancellations as non-interactive.

Use the reason to report when a call was cancelled before approval or because interactive approval is unavailable in `exec` mode. Preserve the existing cancellation message for clients that omit the reason.

## Testing

Update tests to verify that a closed approval response carries the interruption reason and that `exec` cancellation responses include the non-interactive reason.

GitOrigin-RevId: be2a5f7fef539b5db2add53b46aea27e2b8a66fc
History 2026-10-16 19:08:19 +00:00
..
src Distinguish MCP approval cancellation reasons (#54679) 2026-10-16 19:08:19 +00:00
tests Retire worktree and voice feature flags (#54175) 2026-10-15 03:48:33 +00:00
BUILD.bazel [codex] Shard exec Bazel integration test (#19862) 2026-04-27 21:22:53 +00:00
Cargo.toml Suppress repeated turn diffs in codex exec human output (#53444) 2026-10-12 18:21:10 +00:00