mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
fix(agents): skip retry paths for tool timeouts
Thread tool-timeout state through timeout-triggered compaction, generic timeout payload synthesis, and the changelog. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ Docs: https://docs.openclaw.ai
|
||||
### Fixes
|
||||
|
||||
- CLI/update: treat inherited Gateway service markers as origin hints and only block package replacement when the managed Gateway is still live, so self-updates can stop the service and continue safely. (#75729) Thanks @hxy91819.
|
||||
- Agents/failover: exempt run-level timeouts that fire during tool execution from model fallback, timeout-triggered compaction, and generic timeout payload synthesis. Long `process(poll)`, browser, or `exec` tool calls that exceed `agents.defaults.timeoutSeconds` previously rotated auth profiles, switched to a fallback model, and surfaced a misleading "LLM request timed out" error even though the primary model had already responded. Mirrors the existing `timedOutDuringCompaction` precedent (#46889). Fixes #52147. (#75873) Thanks @simonusa.
|
||||
|
||||
## 2026.5.2
|
||||
|
||||
|
||||
@@ -1244,7 +1244,10 @@ export async function runEmbeddedPiAgent(
|
||||
// ── Timeout-triggered compaction ──────────────────────────────────
|
||||
// When the LLM times out with high context usage, compact before
|
||||
// retrying to break the death spiral of repeated timeouts.
|
||||
if (timedOut && !timedOutDuringCompaction) {
|
||||
// Skip when the timeout fired during tool execution: the LLM had
|
||||
// already responded, the prompt wasn't the problem, and compacting
|
||||
// would lose the in-flight tool context. See #52147.
|
||||
if (timedOut && !timedOutDuringCompaction && !timedOutDuringToolExecution) {
|
||||
// Only consider prompt-side tokens here. API totals include output
|
||||
// tokens, which can make a long generation look like high context
|
||||
// pressure even when the prompt itself was small.
|
||||
@@ -2078,7 +2081,17 @@ export async function runEmbeddedPiAgent(
|
||||
// Timeout aborts can leave the run without any assistant payloads.
|
||||
// Emit an explicit timeout error instead of silently completing, so
|
||||
// callers do not lose the turn as an orphaned user message.
|
||||
if (timedOut && !timedOutDuringCompaction && !payloadsWithToolMedia?.length) {
|
||||
// Skip when the timeout fired during tool execution: the assistant
|
||||
// did produce a response (a tool call) that ran long; the generic
|
||||
// "no response from model" payload would mislead the caller. The
|
||||
// partial tool output already in the session is the correct artifact
|
||||
// to surface. See #52147.
|
||||
if (
|
||||
timedOut &&
|
||||
!timedOutDuringCompaction &&
|
||||
!timedOutDuringToolExecution &&
|
||||
!payloadsWithToolMedia?.length
|
||||
) {
|
||||
const timeoutText = idleTimedOut
|
||||
? "The model did not produce a response before the model idle timeout. " +
|
||||
"Please try again, or increase `models.providers.<id>.timeoutSeconds` for slow local or self-hosted providers."
|
||||
|
||||
Reference in New Issue
Block a user