-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[2026.6.2-beta.1] Embedded agent runs abort at ~180s wall-clock regardless of agent/provider timeoutSeconds #90764
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Summary
On
[email protected], long agent loops (40+ messages, ~20+ tool_use/tool_result iterations) abort withsurface_error reason=timeout / rawError=This operation was abortedat a consistent ~165–180s wall-clock duration, regardless of how highagents.defaults.timeoutSecondsandmodels.providers.<id>.timeoutSecondsare set. The error message in stderr explicitly suggests "increaseagents.defaults.timeoutSecondsin your config" — but raising it from 300 → 600 has no effect on the abort timing.This looks like the symptom described in the inline comment at
src/agents/embedded-agent-runner/run/llm-idle-timeout.ts:158-160:… except the abort is hitting at ~180s in our case rather than 120s, even after the fix referenced in that comment was supposed to honor
modelRequestTimeoutMsas a ceiling.Environment
2026.6.2-beta.1(f03f57a)custom-api-anthropic-com(base_urlhttps://api.anthropic.com, modelclaude-sonnet-4-6,thinking=medium)[agent/embedded]lane)apply-cfg-managed configRelevant config
{ "agents": { "defaults": { "timeoutSeconds": 600, "contextTokens": 130000, "thinkingDefault": "medium", "maxConcurrent": 4 } }, "models": { "providers": { "custom-api-anthropic-com": { "timeoutSeconds": 600 } } } }Reproduction / Observation
Outbound
anthropic-payloadlog captured 11 post-config-bump runs in a ~1h window. Aggregated timing per run:This operation was aborted)Pre-config-bump aborts (provider
timeoutSeconds=300, agentstimeoutSeconds=600) showed the same envelope:→ All aborts land in ~165–180s, regardless of provider or agent
timeoutSeconds. A run that takes 166s passes; a run that takes 169s aborts. The boundary is clearly between 167s (ok) and 169s (abort) in the post-edit window.Server log at the moment of abort:
…but
agents.defaults.timeoutSecondsis already at 600, well above the 180s wall-clock the run actually reaches.Workload shape
Each affected run is an agent loop with ~20–30 sequential
tool_use→tool_resultpairs (each call ≈ 5–8s round-trip withthinkingenabled). Cumulative duration grows linearly with tool calls; once it crosses ~165–180s the next stream fence triggers the abort. No oversized prompt, no overflow, no session takeover (after #89811 in 2026.6.2-beta.1 those went away).Suspected sources
Skimming
src/agents/embedded-agent-runner/, candidates I'm unable to rule out without more context:resolveLlmIdleTimeoutMsclamps fall back toDEFAULT_LLM_IDLE_TIMEOUT_MS = 120swhenparams.runTimeoutMsis treated as "no explicit timeout" and not derived fromagents.defaults.timeoutSeconds. CouldresolvedRunTimeoutMsbe ending upundefinedinattempt.ts:2764becauseparams.timeoutMs === configuredRunTimeoutMs, leading to a stricter clamp than expected?compaction-safety-timeout.ts/postCompactionAbortControllerinrun.ts:1202— unsure if these can fire mid-loop without a compaction having been triggered.CLI_RESUME_WATCHDOG_DEFAULTS.maxMs = 180_000incli-watchdog-defaults.ts— exact match for the boundary, but that's specifically the CLI runner watchdog (not embedded). Could the embedded runner be inheriting any "no-output" watchdog with these defaults?Ask
[agent/embedded]runs that is not surfaced throughagents.defaults.timeoutSecondsnormodels.providers.<id>.timeoutSeconds?agents.defaults.timeoutSeconds" pointing to the right knob in this code path, or is there a different config key we should be using?2026.6.2-beta.1cover the chunk-level idle watchdog but not the run-level wall-clock abort?Happy to share the redacted payload log entries and full server logs around an abort if helpful.