[KongchangAI]
Concept

timeout

A timeout configuration for generate()/stream() in the AI SDK. It supports expansion from a single number into a segmented object containing totalMs, stepMs, firstChunkMs and chunkMs, enabling fine-grained timeout control.

Timeline (last 90 days)

Nov 13

In @ai-sdk/workflow 2.0.105, timeout for generate() and stream() supports an object form { totalMs, stepMs, firstChunkMs, chunkMs }, where stepMs limits a single model call and firstChunkMs and chunkMs constrain the first chunk output and inter-chunk wait time in streaming scenarios.

Unverified50%
Nov 13

Version @ai-sdk/workflow@2.0.105 introduces previously missing configuration options such as toolApproval, toolOrder, and the timeout object.

Unverified50%
Oct 22

A timeout should be treated as "I don't know" rather than "no"; the solution is to have code generate an idempotency key and send it with the retry, so that the booking system recognizes the same key and returns the first result.

Unverified50%
Oct 16

In the spike script, 'timeout' measures wall-clock time, so a run stuck on a prompt cannot borrow time from the next run.

Unverified50%
Oct 13

Agent frameworks typically report tool call failures uniformly as 'timeout', but in reality this masks at least four different failure modes.

Unverified50%
Oct 12

Since the watchdog makes the process wait indefinitely, it is advisable to set an upper limit with an external timeout mechanism, for example using the command timeout 3600 env CLAUDE_CODE_RETRY_WATCHDOG=1 claude --your-task.

Unverified50%
Oct 12

A process killed by timeout returns a non-zero exit code (usually 124), and scripts should check this exit code and trigger an alert, otherwise the timeout will be silently ignored.

Unverified50%
Oct 12

Wrapping an env assignment with timeout (such as timeout 3600 env KEY=VALUE command) is standard usage; env injects the environment variable into the child process so that it applies only to that command without polluting the current shell.

Unverified50%
Oct 12

timeout is a command-line tool provided by GNU coreutils, used as timeout [duration] command; after the specified duration it sends a SIGTERM signal to the child process to terminate it, and if the process does not respond it follows up with SIGKILL.

Unverified50%

All Facts (9)

Unverified

In @ai-sdk/workflow 2.0.105, timeout for generate() and stream() supports an object form { totalMs, stepMs, firstChunkMs, chunkMs }, where stepMs limits a single model call and firstChunkMs and chunkMs constrain the first chunk output and inter-chunk wait time in streaming scenarios.

50%
Unverified

A timeout should be treated as "I don't know" rather than "no"; the solution is to have code generate an idempotency key and send it with the retry, so that the booking system recognizes the same key and returns the first result.

50%
Unverified

In the spike script, 'timeout' measures wall-clock time, so a run stuck on a prompt cannot borrow time from the next run.

50%
Unverified

Agent frameworks typically report tool call failures uniformly as 'timeout', but in reality this masks at least four different failure modes.

50%
Unverified

Since the watchdog makes the process wait indefinitely, it is advisable to set an upper limit with an external timeout mechanism, for example using the command timeout 3600 env CLAUDE_CODE_RETRY_WATCHDOG=1 claude --your-task.

50%
Unverified

A process killed by timeout returns a non-zero exit code (usually 124), and scripts should check this exit code and trigger an alert, otherwise the timeout will be silently ignored.

50%
Unverified

Wrapping an env assignment with timeout (such as timeout 3600 env KEY=VALUE command) is standard usage; env injects the environment variable into the child process so that it applies only to that command without polluting the current shell.

50%
Unverified

timeout is a command-line tool provided by GNU coreutils, used as timeout [duration] command; after the specified duration it sends a SIGTERM signal to the child process to terminate it, and if the process does not respond it follows up with SIGKILL.

50%
Unverified

Version @ai-sdk/workflow@2.0.105 introduces previously missing configuration options such as toolApproval, toolOrder, and the timeout object.

50%

Source Articles