Skip to content

The agent that grows with you

fix(approval): resolve the plugin classification lazily inside the guard predicate

teknium19e232a7ff5c1
diff --git a/tools/approval.py b/tools/approval.py
index 24330d20894..021b917d567 100644
--- a/tools/approval.py
+++ b/tools/approval.py
@@ -19,7 +19,6 @@ import os
import threading
from typing import Optional
-from agent import terminal_env_registry
from utils import env_var_enabled, is_truthy_value
from tools import approval_context
from tools.approval_context import (
@@ -1005,7 +1004,10 @@ def _should_skip_container_guards(env_type: str, has_host_access: bool = False)
return not has_host_access
if env_type in ("singularity", "modal", "daytona", "vercel_sandbox"):
return True
- return terminal_env_registry.provider_flag(env_type, "skip_container_guards", False)
+ # Plugin backends declare the same classification through the provider ABI (#94400);
+ # fail-soft to False so an unknown or raising backend keeps the guards on.
+ from agent.terminal_env_registry import provider_flag
+ return bool(provider_flag(env_type, "skip_container_guards", False))
def _user_deny_block(command: str) -> dict | None: