Allow browser app cleanup hooks on interrupt (#46029)

## Why

The cleanup-hook allowlist for `browser@openai-curated-remote` accepted only `Stop` and `SubagentStop`, leaving its cleanup hook unavailable when a turn was interrupted.

## What changed

Allow `Interrupt` to invoke `browser.turn_ended` through `codex_apps`, retaining the registered browser connector and empty-input requirements.

## Testing

Extend hook metadata tests to cover interrupts, rejecting mismatched connectors and manifest-provided arguments. Extend executor integration coverage to interrupt an active turn and verify that browser app and computer-use cleanup calls use their separate MCP routes.

GitOrigin-RevId: 355801f9ca3086bae80d1e623d0be7e1772a39e1
This commit is contained in:
Samuel Yuan
2026-09-16 21:15:09 +00:00
committed by copyberry
parent 47c27cbffa
commit 2b2b0fa870
3 changed files with 66 additions and 4 deletions
+5 -1
View File
@@ -98,7 +98,11 @@ const ALLOWLISTED_BUNDLED_HOOKS: &[BundledHook] = &[
},
BundledHook {
plugin_id: "browser@openai-curated-remote",
events: &[HookEventName::Stop, HookEventName::SubagentStop],
events: &[
HookEventName::Stop,
HookEventName::Interrupt,
HookEventName::SubagentStop,
],
target: BundledHookTarget::App {
server: "codex_apps",
connector_id: "connector_openai_browser",