LearnNewsExamplesServices
Frontmatter
id9760
titleResolve Undici HeadersTimeout in Session Summarization
stateClosed
labels
bugai
assigneestobiu
createdAtApr 7, 2026, 6:19 PM
updatedAtApr 7, 2026, 6:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/9760
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 7, 2026, 6:20 PM

Resolve Undici HeadersTimeout in Session Summarization

Closedbugai
tobiu
tobiu commented on Apr 7, 2026, 6:19 PM

Node's native fetch (via undici) enforces an undocumented 300,000ms (5-minute) timeout for the HTTP headersTimeout. When SessionService pushes massive 300k+ character prompts to a local Ollama instance during autoSummarize, it spans beyond the 5-minute threshold before generating the first token, causing UND_ERR_HEADERS_TIMEOUT and skipping session consolidation.

This ticket aims to refactor the local REST wrapper to bypass fetch entirely and utilize Native Node.js http/https packages to gracefully enforce the requested 1-hour timeout threshold without arbitrary network drops.

tobiu added the bug label on Apr 7, 2026, 6:19 PM
tobiu added the ai label on Apr 7, 2026, 6:19 PM
tobiu assigned to @tobiu on Apr 7, 2026, 6:19 PM
tobiu referenced in commit f600051 - "fix(ai): Resolve Undici HeadersTimeout in SessionService by utilizing native http(s) client (#9760)" on Apr 7, 2026, 6:19 PM
tobiu
tobiu Apr 7, 2026, 6:19 PM

Successfully replaced native node fetch bridging over to raw Node http interface. This allows us to strictly enforce the requested 1-hour generation timeout across Ollama without tripping over the undocumented undici headers timeout mechanism. Sandman queue processing will auto-retry and reliably synthesize remaining sessions on next daemon boot.

tobiu closed this issue on Apr 7, 2026, 6:20 PM