From c6bf330b42ed6fcbdcc902dc06ef38306b2e02f3 Mon Sep 17 00:00:00 2001 From: Krish Chainani Date: Fri, 28 Aug 2026 22:45:18 +0000 Subject: [PATCH] Allow bundled browser cleanup hooks on subagent stop (#41435) ## What changed Allow bundled browser and computer-use plugins to invoke the existing `node_repl.turn_ended` cleanup hook for `SubagentStop` events, matching the allowlist behavior for `Stop` and `Interrupt` events. GitOrigin-RevId: 0fe1784321e793e9861e728b40a48662625b7dca --- codex-rs/core-plugins/src/executor_hooks.rs | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/codex-rs/core-plugins/src/executor_hooks.rs b/codex-rs/core-plugins/src/executor_hooks.rs index 885d9e6e36..3b3bd770da 100644 --- a/codex-rs/core-plugins/src/executor_hooks.rs +++ b/codex-rs/core-plugins/src/executor_hooks.rs @@ -30,6 +30,12 @@ const ALLOWLISTED_EXECUTOR_PLUGIN_HOOKS: &[AllowlistedExecutorPluginHook] = &[ server: "node_repl", tool: "turn_ended", }, + AllowlistedExecutorPluginHook { + plugin_id: "browser@openai-bundled", + event: HookEventName::SubagentStop, + server: "node_repl", + tool: "turn_ended", + }, AllowlistedExecutorPluginHook { plugin_id: "chrome@openai-bundled", event: HookEventName::Stop, @@ -42,6 +48,12 @@ const ALLOWLISTED_EXECUTOR_PLUGIN_HOOKS: &[AllowlistedExecutorPluginHook] = &[ server: "node_repl", tool: "turn_ended", }, + AllowlistedExecutorPluginHook { + plugin_id: "chrome@openai-bundled", + event: HookEventName::SubagentStop, + server: "node_repl", + tool: "turn_ended", + }, AllowlistedExecutorPluginHook { plugin_id: "chrome-dev@openai-bundled", event: HookEventName::Stop, @@ -54,6 +66,12 @@ const ALLOWLISTED_EXECUTOR_PLUGIN_HOOKS: &[AllowlistedExecutorPluginHook] = &[ server: "node_repl", tool: "turn_ended", }, + AllowlistedExecutorPluginHook { + plugin_id: "chrome-dev@openai-bundled", + event: HookEventName::SubagentStop, + server: "node_repl", + tool: "turn_ended", + }, AllowlistedExecutorPluginHook { plugin_id: "chrome-internal@openai-bundled", event: HookEventName::Stop, @@ -66,6 +84,12 @@ const ALLOWLISTED_EXECUTOR_PLUGIN_HOOKS: &[AllowlistedExecutorPluginHook] = &[ server: "node_repl", tool: "turn_ended", }, + AllowlistedExecutorPluginHook { + plugin_id: "chrome-internal@openai-bundled", + event: HookEventName::SubagentStop, + server: "node_repl", + tool: "turn_ended", + }, AllowlistedExecutorPluginHook { plugin_id: "computer-use@openai-bundled", event: HookEventName::Stop, @@ -78,6 +102,12 @@ const ALLOWLISTED_EXECUTOR_PLUGIN_HOOKS: &[AllowlistedExecutorPluginHook] = &[ server: "node_repl", tool: "turn_ended", }, + AllowlistedExecutorPluginHook { + plugin_id: "computer-use@openai-bundled", + event: HookEventName::SubagentStop, + server: "node_repl", + tool: "turn_ended", + }, ]; /// Returns accepted inline hook sources from executor-discovered plugin manifests.