mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Centralize Guardian classification of multi-agent tool calls (#57455)
## What changed Add `GuardianScope::for_multi_agent_tool` and use it for both tool review requirements and asynchronous scoring. Classify `spawn_agent`, `send_message`, `followup_task`, and `interrupt_agent` as native tools when they match the configured namespace, accepting default namespace spellings when none is configured. Keep review enablement checks at each call site. GitOrigin-RevId: 9180ccdc629532f6c171d899dc5881e15b447141
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
use crate::session::session::Session;
|
||||
use crate::tools::context::ToolInvocation;
|
||||
use crate::tools::registry::CoreToolRuntime;
|
||||
use codex_protocol::openai_models::GuardianScope;
|
||||
use codex_tools::JsonSchema;
|
||||
use codex_tools::ResponsesApiNamespace;
|
||||
use codex_tools::ResponsesApiNamespaceTool;
|
||||
@@ -123,10 +124,8 @@ impl CoreToolRuntime for MultiAgentV2ToolOverrides {
|
||||
.config
|
||||
.features
|
||||
.enabled(codex_features::Feature::GuardianNativeMultiAgentHistory)
|
||||
&& matches!(
|
||||
self.handler.tool_name().name.as_str(),
|
||||
"spawn_agent" | "send_message" | "followup_task" | "interrupt_agent"
|
||||
)
|
||||
&& GuardianScope::for_multi_agent_tool(&self.tool_name(), self.namespace.as_deref())
|
||||
.is_some()
|
||||
}
|
||||
|
||||
fn wait_until_ready<'a>(&'a self, session: &'a Arc<Session>) -> Option<BoxFuture<'a, ()>> {
|
||||
|
||||
Reference in New Issue
Block a user