openclaw - 💡(How to fix) Fix Bug: Bedrock Converse Streaming silently aborts on long-context agent sessions (~6 min timeout, no retry, no fallback)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Agent sessions using the amazon-bedrock provider abort silently after ~6 minutes when handling long-context prompts that require long streaming responses. The session dies with no retry, no fallback, and no transcript written — all work is lost.

Error Message

"status": "error", 4. Surface a meaningful error to the operator (not just "This operation was aborted") The Bedrock Converse Streaming API appears to silently drop the connection after ~6 minutes on large payload requests. This is not surfaced as a named timeout error — it manifests as an internal abort in the bedrock-converse-stream adapter. The 6-minute window is suspiciously consistent and may correspond to an undocumented AWS streaming connection limit.

Root Cause

Root cause hypothesis

Fix Action

Workaround

Provision ANTHROPIC_API_KEY on the instance and use anthropic/claude-sonnet-4-6 direct instead of Bedrock. No abort on the same prompt.

Code Example

{
  "status": "error",
  "aborted": true,
  "externalAbort": false,
  "timedOut": false,
  "idleTimedOut": false,
  "timedOutDuringCompaction": false,
  "timedOutDuringToolExecution": false,
  "promptError": "This operation was aborted"
}
RAW_BUFFERClick to expand / collapse

Summary

Agent sessions using the amazon-bedrock provider abort silently after ~6 minutes when handling long-context prompts that require long streaming responses. The session dies with no retry, no fallback, and no transcript written — all work is lost.

Environment

  • OpenClaw version: 2026.5.4
  • Provider: amazon-bedrock (Bedrock Converse Streaming API)
  • Model: amazon-bedrock/global.anthropic.claude-sonnet-4-6
  • Trigger: Large prompt (~36,000 chars) + expected long output (exam paper response)
  • Platform: macOS, launchd-managed gateway

Reproduction

  1. Configure an agent with amazon-bedrock/global.anthropic.claude-sonnet-4-6 as primary model
  2. Send a session prompt of ~36,000 characters that requires a long, detailed response
  3. Observe session abort at approximately 6 minutes

Observed behaviour

Session trajectory metadata after abort:

{
  "status": "error",
  "aborted": true,
  "externalAbort": false,
  "timedOut": false,
  "idleTimedOut": false,
  "timedOutDuringCompaction": false,
  "timedOutDuringToolExecution": false,
  "promptError": "This operation was aborted"
}
  • Session started: 2026-05-29T02:04:32Z
  • Session ended: 2026-05-29T02:10:33Z (6 min 1 sec)
  • Session .jsonl transcript file never written (ENOENT) — no output saved
  • externalAbort: false — not killed externally
  • timedOut: false — did not hit the configured session timeout
  • promptError: "This operation was aborted" — abort originated inside the Bedrock streaming call

Expected behaviour

  1. On stream drop: automatic retry (at least once) before declaring failure
  2. If retry exhausted: route to configured fallback model rather than failing the session
  3. If session must fail: flush partial transcript to disk before dying
  4. Surface a meaningful error to the operator (not just "This operation was aborted")

Root cause hypothesis

The Bedrock Converse Streaming API appears to silently drop the connection after ~6 minutes on large payload requests. This is not surfaced as a named timeout error — it manifests as an internal abort in the bedrock-converse-stream adapter. The 6-minute window is suspiciously consistent and may correspond to an undocumented AWS streaming connection limit.

Impact

  • All work is lost — no transcript written, no partial output saved
  • Silent failure — operator sees only "This operation was aborted" with no actionable context
  • No fallback fires — configured fallback models are not tried on stream abort

Workaround

Provision ANTHROPIC_API_KEY on the instance and use anthropic/claude-sonnet-4-6 direct instead of Bedrock. No abort on the same prompt.

Related

  • #87318 — params.modelId override ignored on Bedrock provider (separate bug, same provider layer)

Reported by Haderach-Ram. Production instance, not a test environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bug: Bedrock Converse Streaming silently aborts on long-context agent sessions (~6 min timeout, no retry, no fallback)