Description
Hit a 400 ValidationException from Bedrock's Converse API that bricks the session, in the same family as #45620 but a different specific mechanism.
statusCode: 400
isRetryable: false
x-amzn-errortype: ValidationException
message: "Cache point cannot be inserted after reasoning block. Please remove the invalid cache point and try again."
Endpoint: https://bedrock-runtime.ap-south-1.amazonaws.com/model/global.anthropic.claude-opus-5-5/converse-stream
Occurred: 2026-09-30T04:08:13Z (per Bedrock's own response date header)
Model: global.anthropic.claude-opus-5-5, reasoning variant max
Session: a long-running session (280 messages) using extended thinking throughout.
How this differs from #45620
#45620 (fixed by #45621 / #45769, merged 2026-08-27) was about unsigned reasoning blocks left behind by a stream that died mid-thinking — the fix filters out reasoning content the SDK can't replay before caching. This error is different: it's Bedrock's API rejecting the structural placement of a cache checkpoint immediately after a reasoning block, independent of whether that reasoning block's signature is valid. The existing fix filters unreplayable reasoning; it does not appear to prevent opencode's caching logic from placing a cache point directly after a (validly signed) reasoning block when that's the last content in the message.
Impact
This was the last message in the session when it occurred — no successful turn has gone through since. It's unclear whether the invalid cache point is purely session-state held by the running client (in which case killing the client and reattaching to the same session would clear it) or baked into the session's stored message data and replayed on every subsequent request (as #45620 originally described: "every request in the session is a non-retryable 400"). Haven't yet confirmed which, since retrying risked losing session continuity without being able to recover it.
Environment
- opencode v1.18.32 (latest as of 2026-09-21)
- Provider: amazon-bedrock, region ap-south-1
- Long session (280 messages), heavy extended-thinking usage ("max" variant)
Request for maintainers
- Does opencode's cache-point placement logic (
applyCaching) need to also skip placing a cache point directly after a reasoning block, not just filter unsigned/unreplayable reasoning content?
- If a session does hit this, is there a supported way to recover it (e.g. reverting the last message/checkpoint) without losing the rest of the session, given the
revert field that exists on stored sessions? Couldn't find documented syntax for this.
Description
Hit a 400 ValidationException from Bedrock's Converse API that bricks the session, in the same family as #45620 but a different specific mechanism.
Endpoint:
https://bedrock-runtime.ap-south-1.amazonaws.com/model/global.anthropic.claude-opus-5-5/converse-streamOccurred: 2026-09-30T04:08:13Z (per Bedrock's own response
dateheader)Model:
global.anthropic.claude-opus-5-5, reasoning variantmaxSession: a long-running session (280 messages) using extended thinking throughout.
How this differs from #45620
#45620 (fixed by #45621 / #45769, merged 2026-08-27) was about unsigned reasoning blocks left behind by a stream that died mid-thinking — the fix filters out reasoning content the SDK can't replay before caching. This error is different: it's Bedrock's API rejecting the structural placement of a cache checkpoint immediately after a reasoning block, independent of whether that reasoning block's signature is valid. The existing fix filters unreplayable reasoning; it does not appear to prevent opencode's caching logic from placing a cache point directly after a (validly signed) reasoning block when that's the last content in the message.
Impact
This was the last message in the session when it occurred — no successful turn has gone through since. It's unclear whether the invalid cache point is purely session-state held by the running client (in which case killing the client and reattaching to the same session would clear it) or baked into the session's stored message data and replayed on every subsequent request (as #45620 originally described: "every request in the session is a non-retryable 400"). Haven't yet confirmed which, since retrying risked losing session continuity without being able to recover it.
Environment
Request for maintainers
applyCaching) need to also skip placing a cache point directly after a reasoning block, not just filter unsigned/unreplayable reasoning content?revertfield that exists on stored sessions? Couldn't find documented syntax for this.