Summary
In WebAgent.generateAndProcessAction, the LLM call passes a timeout to streamText(...), but the response is consumed with:
// packages/core/src/webAgent.ts (~line 1002 / 1017)
const streamResult = streamText({ ...this.providerConfig, timeout: this.llmProviderTimeoutMs, abortSignal: this.abortSignal, ... });
for await (const part of streamResult.fullStream) { ... }
The timeout/abortSignal cover the initial request, but the for await (... fullStream) iteration itself is not independently bounded. If the provider stalls mid-stream (partial data then silence, or a zombie TCP connection with no FIN), the loop can hang indefinitely.
Why it matters
This is a second potential source of indefinite agent freezes (distinct from the browser-side hang fixed in #511). It would present similarly: no progress, process idle on a socket read.
Suggested fix
Bound the stream consumption — e.g. an inactivity/overall timeout via Promise.race around the iteration, or an AbortController tied to a watchdog that fires if no stream event arrives within a window. Verify the AI SDK's abortSignal actually interrupts an in-flight for await on this provider.
Context
Flagged while diagnosing #511. Not the confirmed cause there (that was browser-side), but the same indefinite-hang class.
Summary
In
WebAgent.generateAndProcessAction, the LLM call passes atimeouttostreamText(...), but the response is consumed with:The
timeout/abortSignalcover the initial request, but thefor await (... fullStream)iteration itself is not independently bounded. If the provider stalls mid-stream (partial data then silence, or a zombie TCP connection with no FIN), the loop can hang indefinitely.Why it matters
This is a second potential source of indefinite agent freezes (distinct from the browser-side hang fixed in #511). It would present similarly: no progress, process idle on a socket read.
Suggested fix
Bound the stream consumption — e.g. an inactivity/overall timeout via
Promise.racearound the iteration, or anAbortControllertied to a watchdog that fires if no stream event arrives within a window. Verify the AI SDK'sabortSignalactually interrupts an in-flightfor awaiton this provider.Context
Flagged while diagnosing #511. Not the confirmed cause there (that was browser-side), but the same indefinite-hang class.