Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/lib/prompt-analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,16 @@ Respond with JSON only, no explanation.`;
const tempAnalysisDir = getTempDirectoryPath('PROMPT_ANALYSIS');
await fs.mkdir(tempAnalysisDir, { recursive: true }).catch(() => {});

// Simplified options - optimize for speed in hook mode
// Simplified options - optimize for speed in hook mode.
// maxThinkingTokens: 0 disables thinking regardless of the user's Claude
// Code settings (e.g. alwaysThinkingEnabled). Haiku does not support
// thinking, so without this the API returns 400 when the global setting
// is on. Analysis does not need thinking anyway; it only emits JSON.
const queryOptions = {
maxTurns: 1, // Single turn only
model: selectedModel, // Use selected model (haiku by default)
disallowedTools: ['*'], // No tools needed for JSON response
maxThinkingTokens: 0, // Required for Haiku compatibility
cwd: tempAnalysisDir // Use temp directory to isolate analysis sessions
};

Expand Down
Loading