mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Refresh hook runtimes after plugin changes (#38703)
## What changed - Rebuild hook runtimes for loaded sessions when effective plugins change or a marketplace upgrade installs new plugin content. - Refresh plugin-related caches and MCP runtimes alongside hooks after plugin mutations. - Preserve each loaded session's current configuration while rebuilding its hooks. ## Testing - Cover direct plugin upgrades, including subsequent turn and session-end hooks. - Cover automatic marketplace upgrades for an already loaded session. GitOrigin-RevId: fef64c68d652f300c7f3d88e81c5017459aa9a18
This commit is contained in:
1 parent
53f3fa7496
commit
e5470f1bce
7 files changed
+490
-6
No files matched your search
@@ -1733,6 +1733,10 @@ impl Session {
|
||||
};
|
||||
self.emit_config_changed_contributors(previous_config.as_ref(), new_config.as_ref());
|
||||
self.schedule_mcp_prewarm();
|
||||
self.refresh_hooks(config).await;
|
||||
}
|
||||
|
||||
pub(crate) async fn refresh_hooks(&self, config: Arc<Config>) {
|
||||
let environments = self.services.turn_environments.snapshot().await;
|
||||
let hooks_config = build_hooks_config(
|
||||
config.as_ref(),
|
||||
|
||||
Reference in new issue
Block a user