fix: wire allowed_tools/disallowed_tools inputs through to Claude SDK
The disallowed tools env var read in run.ts was DISALLOWED_TOOLS_INPUT (raw user input) instead of DISALLOWED_TOOLS (computed value including WebSearch/WebFetch defaults). This meant default tool disallowance was never enforced. Also removes orphaned ALLOWED_TOOLS env var export from createPrompt() (tag mode passes allowed tools via claudeArgs instead), extracts shared parseToolsInput utility to eliminate duplication, and adds tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
29a1032aa6
commit
df7afc08d4
7 files changed
+112
-8
No files matched your search
@@ -245,6 +245,7 @@ async function run() {
|
||||
|
||||
const claudeResult: ClaudeRunResult = await runClaude(promptConfig.path, {
|
||||
claudeArgs: prepareResult.claudeArgs,
|
||||
disallowedTools: process.env.DISALLOWED_TOOLS || undefined,
|
||||
appendSystemPrompt: process.env.APPEND_SYSTEM_PROMPT,
|
||||
model: process.env.ANTHROPIC_MODEL,
|
||||
pathToClaudeCodeExecutable:
|
||||
|
||||
Reference in new issue
Block a user