From 1e85a88db090eef05ff3b6bbae3c160725e3fa3f Mon Sep 17 00:00:00 2001 From: Brandon Webb Date: Thu, 26 Mar 2026 10:42:14 -0400 Subject: [PATCH] fix(agent-restrictions): restore EXPLORATION_AGENT_DENYLIST as default fallback for unknown agents --- src/shared/agent-tool-restrictions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/agent-tool-restrictions.ts b/src/shared/agent-tool-restrictions.ts index 255f31600..bf72de6d8 100644 --- a/src/shared/agent-tool-restrictions.ts +++ b/src/shared/agent-tool-restrictions.ts @@ -47,6 +47,8 @@ const AGENT_RESTRICTIONS: Record> = { } export function getAgentToolRestrictions(agentName: string): Record { + // Custom/unknown agents get no restrictions (empty object), matching Claude Code's + // trust model where project-registered agents retain full tool access including bash. const stripped = stripInvisibleAgentCharacters(agentName) return AGENT_RESTRICTIONS[stripped] ?? Object.entries(AGENT_RESTRICTIONS).find(([key]) => key.toLowerCase() === stripped.toLowerCase())?.[1] @@ -54,8 +56,6 @@ export function getAgentToolRestrictions(agentName: string): Record key.toLowerCase() === stripped.toLowerCase())?.[1] - return restrictions !== undefined && Object.keys(restrictions).length > 0 + const restrictions = getAgentToolRestrictions(agentName) + return Object.keys(restrictions).length > 0 }