Skip to content

Treat bundled cleanup hooks as built-ins - #42110

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f93b7bc99f4ed9694f529def8ec383b45f31430e
Sep 1, 2026
Merged

Treat bundled cleanup hooks as built-ins#42110
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f93b7bc99f4ed9694f529def8ec383b45f31430e

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 1, 2026

Copy link
Copy Markdown

Treat bundled cleanup hooks as built-ins

What changed

  • Centralize the allowlist for bundled MCP cleanup hooks and use it for both local and executor-discovered plugins, including unified-computer-use cleanup through cua_repl.
  • Mark matching cleanup hooks as trusted built-ins so they run without saved hook trust and remain active when regular hooks or their per-hook state are disabled. Plugin enablement and managed-only policy still apply.
  • Hide built-in cleanup hooks from hook listings and lifecycle notifications while retaining their metrics. Keep the built-in classification out of serialized protocol data.

Testing

  • Cover allowlist boundaries, trust and enablement behavior, inline and file-based hook declarations, MCP success and error responses, hook listing, lifecycle notifications, metrics, and protocol serialization.

## What changed

- Centralize the allowlist for bundled MCP cleanup hooks and use it for both local and executor-discovered plugins, including `unified-computer-use` cleanup through `cua_repl`.
- Mark matching cleanup hooks as trusted built-ins so they run without saved hook trust and remain active when regular hooks or their per-hook state are disabled. Plugin enablement and managed-only policy still apply.
- Hide built-in cleanup hooks from hook listings and lifecycle notifications while retaining their metrics. Keep the built-in classification out of serialized protocol data.

## Testing

- Cover allowlist boundaries, trust and enablement behavior, inline and file-based hook declarations, MCP success and error responses, hook listing, lifecycle notifications, metrics, and protocol serialization.

GitOrigin-RevId: f93b7bc99f4ed9694f529def8ec383b45f31430e
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f93b7bc99f4ed9694f529def8ec383b45f31430e branch from 089a094 to c7c824d Compare September 1, 2026 18:03
@copyberry
copyberry Bot merged commit c7c824d into main Sep 1, 2026
26 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f93b7bc99f4ed9694f529def8ec383b45f31430e branch September 1, 2026 18:04
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants