From 1549799c1e1f2d266248b39b7ac790bca7af1b14 Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Wed, 25 Mar 2026 20:29:48 -0700 Subject: [PATCH] Move OPENCODE_DISABLE_PROJECT_CONFIG after envConfig loop Setting the env var before the user-config loop meant adapter env overrides could disable the guard. Move it after the loop so it always wins, matching the pattern already used in test.ts and models.ts. Co-Authored-By: Paperclip --- packages/adapters/opencode-local/src/server/execute.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/adapters/opencode-local/src/server/execute.ts b/packages/adapters/opencode-local/src/server/execute.ts index d39c3795..788ad835 100644 --- a/packages/adapters/opencode-local/src/server/execute.ts +++ b/packages/adapters/opencode-local/src/server/execute.ts @@ -128,10 +128,6 @@ export async function execute(ctx: AdapterExecutionContext): Promise 0; const env: Record = { ...buildPaperclipEnv(agent) }; - // Prevent OpenCode from writing an opencode.json config file into the - // project working directory (which would pollute the git repo). Model - // selection is already handled via the --model CLI flag. - env.OPENCODE_DISABLE_PROJECT_CONFIG = "true"; env.PAPERCLIP_RUN_ID = runId; const wakeTaskId = (typeof context.taskId === "string" && context.taskId.trim().length > 0 && context.taskId.trim()) || @@ -173,6 +169,11 @@ export async function execute(ctx: AdapterExecutionContext): Promise