chore: remove CLAUDE_CODE_MAX_OUTPUT_TOKENS env var handling

No longer needed with the new Claude Agent SDK version.
This commit is contained in:
ajmallesh
2026-02-11 13:32:26 -08:00
parent efc492a3f9
commit 57d82b41ae
3 changed files with 1 additions and 13 deletions

View File

@@ -220,9 +220,7 @@ export async function runClaudePrompt(
const mcpServers = buildMcpServers(sourceDir, agentName);
// Build env vars to pass to SDK subprocesses
const sdkEnv: Record<string, string> = {
CLAUDE_CODE_MAX_OUTPUT_TOKENS: process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS || '64000',
};
const sdkEnv: Record<string, string> = {};
if (process.env.ANTHROPIC_API_KEY) {
sdkEnv.ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY;
}

View File

@@ -166,15 +166,6 @@ function handleStructuredError(
false // Not retryable - needs code fix
),
};
case 'max_output_tokens':
return {
detected: true,
shouldThrow: new PentestError(
`Max output tokens reached: ${content.slice(0, 100)}`,
'billing',
true // Retryable - may succeed with different content
),
};
case 'unknown':
default:
return { detected: true };

View File

@@ -73,7 +73,6 @@ export type SDKAssistantMessageError =
| 'rate_limit'
| 'invalid_request'
| 'server_error'
| 'max_output_tokens'
| 'unknown';
export interface AssistantMessage {