diff --git a/src/qwen-delegate.ts b/src/qwen-delegate.ts index b76d63d..f30504c 100644 --- a/src/qwen-delegate.ts +++ b/src/qwen-delegate.ts @@ -38,7 +38,9 @@ export function delegateToQwen( // parser ("Cannot use both a positional prompt and the --prompt (-p) flag together"). // Build the command as a single, explicitly-quoted string instead. const quoteArg = (s: string) => `"${s.replace(/"/g, '\\"')}"`; - const command = ["qwen", "-p", quoteArg(prompt)].join(" "); + // Non-interactive mode has no TTY to approve tool calls, so web_fetch would otherwise + // be denied outright; allow just that tool rather than going full --yolo. + const command = ["qwen", "-p", quoteArg(prompt), "--allowed-tools", "web_fetch"].join(" "); const child: ChildProcess = spawnFn(command, { shell: true, stdio: ["ignore", "pipe", "pipe"],