Files
codex/codex-rs/core/tests
dermanyang-oai 40c425a380 Support conversation-scoped MCP tool approvals (#65348)
## Why

An MCP tool approval remembered for a live session is lost when the
conversation resumes in a new session, so the user can be prompted again
for the same tool and linked account.

## What changed

Let hosts attach an `McpToolApprovalStore` to a persistent thread to save
and reuse eligible approvals for host-owned app tools. Each grant is
bound to the authenticated member, thread, and exact tool registration,
including its plugin, connector, and account link.

Reuse a grant only after permission hooks and reviewer policy have run,
and revalidate it before handing off the call. If saving a new grant
fails, stop the call before handoff.

## Testing

Add coverage for approval reuse after resume and compaction, isolation
across forks and member changes, hook and reviewer enforcement, and
failed saves.

GitOrigin-RevId: fd022c19e94e9ceafa97b1dd71478e05c477c36d
2026-12-02 22:40:57 +00:00
..