mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why `with_executor_hooks` clones the hook registry to create an executor-specific view. Copying the configured handlers, plugin sources, and diagnostics on every clone is unnecessary when that configuration is unchanged. ## What changed Store hook configuration in `Arc`-backed collections and use copy-on-write when replacing executor-scoped handlers. Skip handler mutation when there are no executor hooks to add or remove. ## Testing Extend the executor hook registration test to verify that updating a cloned engine leaves the previous engine's handlers unchanged. GitOrigin-RevId: 6b188ca6ca21772ccd7336344d98c023f769834e