fix: preserve sandbox allow-all semantics

This commit is contained in:
Peter Steinberger
2026-02-16 01:52:03 +00:00
parent 014d45f7ee
commit d95be2c384
3 changed files with 91 additions and 21 deletions

View File

@@ -89,6 +89,9 @@ export function resolveSandboxToolPolicyForAgent(
// `image` is essential for multimodal workflows; always include it in sandboxed
// sessions unless explicitly denied.
if (
// Empty allowlist means "allow all" for `isToolAllowed`, so don't inject a
// single tool that would accidentally turn it into an explicit allowlist.
expandedAllow.length > 0 &&
!expandedDeny.map((v) => v.toLowerCase()).includes("image") &&
!expandedAllow.map((v) => v.toLowerCase()).includes("image")
) {