Files
codex/codex-rs/ext/mcp
Dmitriy Kovalenko 76dcb8199b Honor permission grant scopes in executor capability discovery (#60461)
## Why

Approved filesystem access should make executor skills discoverable and readable for the lifetime of the grant. Turn-scoped access must not authorize persistent plugin servers or hooks, or bypass disabled-plugin policy.

## What changed

- Apply environment-specific session grants to capability discovery and refresh MCP after session grants change.
- Use a separate discovery inventory for skills with turn-scoped grants, keeping plugin servers and hooks on the session inventory. Reuse discovery results across unchanged model steps.
- Preserve disabled-plugin checks for unreadable manifests and symlinked manifest files or directories, including ancestor markers, while retaining standalone skill roots.

## Testing

Add coverage for V1 and V2 skill discovery before approval, after approval, and on the next turn; disabled-plugin ownership checks; discovery cache reuse; and session hooks surviving turn-scoped discovery failure.

GitOrigin-RevId: 929a7f8cb01f4bcfb4bee2c50ae02cd762066b2d
2026-11-09 22:20:07 +00:00
..