amal66 puts a timeout on stuck AI answers

A small reliability guard stops a stalled AI connection from leaving a legal-workflow chat hanging indefinitely.

infrastructureworkflow

amal66 has added a time limit around streamed AI responses. If an external AI provider stops sending an answer mid-request, the system can now stop waiting rather than leaving the user stranded in an apparently endless response.

It is a modest change, but an important one for work involving long legal documents, where a slow answer and a dead connection can look much the same. The practical question is whether the chosen limit gives complex prompts enough room to finish, while still failing clearly when a provider connection has genuinely stalled.

The fork is worth a closer look for its approach to handling the cleanup after a timeout.

So what Legal teams relying on AI chat for document-heavy work should care because predictable failure is far better than a workflow that simply freezes.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from amal66/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
54dcdf77 fix(chapter-13): time-limit stalled LLM streams Amal 2026-05-24 ↗ GitHub
commit body
Chapter: 13 - Bounded external calls.

Plain-English map:
Add a three-minute timeout around LLM server-sent-event streams so a stalled
provider call cannot hold a connection open forever.

Why it matters:
External services can hang. Without a timeout, one stuck call can consume
server resources until something outside the app kills it.

Principle:
Every external dependency call should have a clear time boundary.

Precedent borrowed:
Upstream PR #112.

Upstream base: willchen96/mike@d39f580.
Original local commit: 8992d98.

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-2005.md from inside the repo you want the changes in.

⬇ Download capture-thread-2005.md