fix: pass allowed_tools to SDK in agent mode

Agent mode never passed ALLOWED_TOOLS_INPUT to the Claude SDK —
only tag mode did (via --allowedTools in claudeArgs). This meant
the allowed_tools action input was silently ignored in agent mode,
causing all Bash commands to require interactive approval in CI.

Pass ALLOWED_TOOLS_INPUT directly as options.allowedTools, which
the SDK merges with any tools from claudeArgs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-27 12:58:09 +02:00
1 parent ed536bb8a3
commit 2978878d82
1 file changed
+1
+1
View File
@@ -253,6 +253,7 @@ async function run() {
promptConfig.path,
{
claudeArgs: prepareResult.claudeArgs,
allowedTools: process.env.ALLOWED_TOOLS_INPUT || undefined,
disallowedTools: process.env.DISALLOWED_TOOLS || undefined,
appendSystemPrompt: process.env.APPEND_SYSTEM_PROMPT,
model: process.env.ANTHROPIC_MODEL,