Files
codex/codex-rs/core/tests
Anthony Tafoya 0769c6aeeb Enable executor cleanup hooks with V2 capability discovery (#56044)
## Why

Executor hooks depended on V1 discovery snapshots, so plugins discovered through V2 could not run their cleanup hooks.

## What changed

Prepare executor hook sources during step setup from either V1 or V2 discovery and capture them in `StepContext` for stop, interrupt, and memory consolidation hooks. Restrict V2 sources to selected plugin installations while preserving plugin enablement, hook admission, MCP routing, and app tool policy checks.

## Testing

Add unit coverage for V2 hook admission, environment routing, disabled plugins, and failed discovery. Add integration coverage showing that `Stop` and `Interrupt` cleanup hooks run with V2 discovery alone and remain silent when the plugin is disabled.

GitOrigin-RevId: a4c0e9c56bdebcdf22cea63f02f8fb4c5eed358e
2026-10-22 01:42:11 +00:00
..