From bcab2bce434426cb34cf24d3291221269438d9dc Mon Sep 17 00:00:00 2001 From: Tony Casey Date: Sat, 14 Feb 2026 22:59:17 +0000 Subject: [PATCH 1/2] fix: increase default LLM enrichTimeout from 5s to 8s (GIT-95) The commit-msg hook was falling back to heuristic analysis because the LLM API calls were timing out at the 5 second default. Anthropic API calls typically take 2-5 seconds but can take longer during high load. Increased to 8 seconds (not higher) because the hook itself has a 10 second hard timeout via setupShutdown() - must leave buffer for the rest of the hook processing. Co-Authored-By: Claude Opus 4.5 AI-Agent: Claude-Code/2.1.42 AI-Model: claude-opus-4-5-20251101 AI-Decision: the LLM API calls were timing out at the 5 second default AI-Confidence: medium AI-Tags: hooks, utils, pattern:because-clause AI-Lifecycle: project AI-Memory-Id: 6c4a23e2 AI-Source: heuristic --- src/hooks/utils/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/utils/config.ts b/src/hooks/utils/config.ts index cb44383b..8096a201 100644 --- a/src/hooks/utils/config.ts +++ b/src/hooks/utils/config.ts @@ -51,7 +51,7 @@ const DEFAULTS: IHookConfig = { requireType: false, defaultLifecycle: 'project', enrich: true, - enrichTimeout: 5000, + enrichTimeout: 8000, }, }, }; From a924f3ce17f91ab6fb11da5175a28c0bb5c5e0eb Mon Sep 17 00:00:00 2001 From: Tony Casey Date: Sat, 14 Feb 2026 23:09:11 +0000 Subject: [PATCH 2/2] docs: update enrichTimeout default in IHookConfig comment AI-Agent: Claude-Code/2.1.42 AI-Model: claude-opus-4-5-20251101 AI-Decision: The default enrichTimeout for LLM enrichment calls was changed from 5000ms to 8000ms, and there's a constraint that it must be under the hook timeout of 10 seconds. AI-Confidence: verified AI-Tags: ihookconfig, timeout, llm-enrichment, configuration, hook-constraints AI-Lifecycle: project AI-Memory-Id: 7f8d8075 AI-Source: llm-enrichment --- src/domain/interfaces/IHookConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/interfaces/IHookConfig.ts b/src/domain/interfaces/IHookConfig.ts index c382b272..49c688b5 100644 --- a/src/domain/interfaces/IHookConfig.ts +++ b/src/domain/interfaces/IHookConfig.ts @@ -47,7 +47,7 @@ export interface ICommitMsgConfig { readonly defaultLifecycle: 'permanent' | 'project' | 'session'; /** Enable LLM enrichment for richer trailer content. Requires ANTHROPIC_API_KEY. */ readonly enrich: boolean; - /** Timeout in ms for LLM enrichment call. Default: 5000. */ + /** Timeout in ms for LLM enrichment call. Default: 8000. Must be under hook timeout (10s). */ readonly enrichTimeout: number; }