Fix Claude copy-edit prompt transport (#529)

Pass staged copy-edit prompts over stdin so large batches do not exceed platform argv limits.

AI assistance: Implemented and validated with OpenAI Codex under maintainer authorization.
This commit is contained in:
Paul Bakaus
2026-08-09 16:56:46 -07:00
committed by GitHub
parent 0dd4f90af6
commit 63fb8a56f9
2 changed files with 43 additions and 2 deletions
+1 -2
View File
@@ -470,12 +470,11 @@ function runClaude(prompt, { cwd, env, resultPath, logPath, timeoutMs = DEFAULT_
if (env.IMPECCABLE_LIVE_COPY_AGENT_MODEL) {
args.push('--model', env.IMPECCABLE_LIVE_COPY_AGENT_MODEL);
}
args.push(prompt);
// Forward env as-is so CLAUDE_CODE_OAUTH_TOKEN and ANTHROPIC_API_KEY flow
// through. On macOS, `claude /login` stores creds in the Keychain, which a
// non-TTY subprocess cannot read; setting CLAUDE_CODE_OAUTH_TOKEN (via
// `claude setup-token`) is the supported headless auth path.
return runAgentProcess('claude', args, '', { cwd, env, logPath, timeoutMs, mirrorOutputPath: resultPath });
return runAgentProcess('claude', args, prompt, { cwd, env, logPath, timeoutMs, mirrorOutputPath: resultPath });
}
function runAgentProcess(command, args, stdin, { cwd, env, logPath, timeoutMs, mirrorOutputPath }) {