From e9cc1fb8d94af893889aa268e96531b96970848e Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 2 Mar 2026 16:08:55 -0600 Subject: [PATCH] fix(adapter): combine instructions file and path directive into single temp file Claude CLI forbids using both --append-system-prompt-file and --append-system-prompt simultaneously. Write a merged temp file instead. Co-Authored-By: Claude Opus 4.6 --- .../claude-local/src/server/execute.ts | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/adapters/claude-local/src/server/execute.ts b/packages/adapters/claude-local/src/server/execute.ts index 52f907f9..4ae8e2e7 100644 --- a/packages/adapters/claude-local/src/server/execute.ts +++ b/packages/adapters/claude-local/src/server/execute.ts @@ -291,6 +291,18 @@ export async function execute(ctx: AdapterExecutionContext): Promise 0) args.push("--max-turns", String(maxTurns)); - if (instructionsFilePath) { - args.push("--append-system-prompt-file", instructionsFilePath); - args.push( - "--append-system-prompt", - `The above agent instructions were loaded from ${instructionsFilePath}. Resolve any relative file references from ${instructionsFileDir}.`, - ); + if (effectiveInstructionsFilePath) { + args.push("--append-system-prompt-file", effectiveInstructionsFilePath); } args.push("--add-dir", skillsDir); if (extraArgs.length > 0) args.push(...extraArgs);