mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
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:
@@ -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 }) {
|
||||
|
||||
Reference in New Issue
Block a user