Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Allow bundled browser cleanup hooks on subagent stop (#41435)

Krish Chainanic6bf330b42ed
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.