From 5020ce9a657d1d12a6b9eb16a07464be46d5843d Mon Sep 17 00:00:00 2001 From: Maxwell Calkin Date: Sun, 8 Mar 2026 17:53:32 -0400 Subject: [PATCH] fix: add fallback for RUNNER_TEMP to prevent undefined path When RUNNER_TEMP is not set (e.g., local testing or non-standard CI environments), the execution file path resolves to the literal string "undefined/claude-execution-output.json", causing a confusing ENOENT error. Falls back to /tmp when RUNNER_TEMP is unset. Co-Authored-By: Claude Opus 4.6 --- src/run-claude-sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/run-claude-sdk.ts b/src/run-claude-sdk.ts index d032f93..d388610 100644 --- a/src/run-claude-sdk.ts +++ b/src/run-claude-sdk.ts @@ -16,7 +16,7 @@ export type ClaudeRunResult = { structuredOutput?: string; }; -const EXECUTION_FILE = `${process.env.RUNNER_TEMP}/claude-execution-output.json`; +const EXECUTION_FILE = `${process.env.RUNNER_TEMP || "/tmp"}/claude-execution-output.json`; /** Filename for the user request file, written by prompt generation */ const USER_REQUEST_FILENAME = "claude-user-request.txt";