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
@@ -292,6 +292,30 @@ fn resolves_apps_hook_metadata_from_the_registered_connector() {
routing.clone(),
true,
),
(
"registered interrupted app",
"Interrupt",
Some("connector_openai_browser"),
json!({}),
routing.clone(),
true,
),
(
"colliding interrupt tool name",
"Interrupt",
Some("connector_other_browser"),
json!({}),
routing.clone(),
false,
),
(
"interrupt manifest arguments",
"Interrupt",
Some("connector_openai_browser"),
json!({ "untrusted": "manifest-provided input" }),
routing.clone(),
false,
),
(
"colliding subagent tool name",
"SubagentStop",