Problem
When thinking: adaptive is enabled and a session has accumulated signed thinking blocks, a model version update (or TTL expiry) can invalidate those signatures. The gateway currently has no recovery path for this error:
LLM request rejected: messages.N.content.N: Invalid signature in thinking block
The session enters a permanent loop — every subsequent message re-attempts the same request with the corrupt history, failing repeatedly. The only workaround is a manual /reset command, which loses session context.
Steps to Reproduce
- Enable
thinking: adaptive on an agent
- Let the session accumulate thinking blocks over an extended period
- Trigger a model version update (fleet rolling deploy) OR wait for signature TTL to expire
- Any new message to the agent triggers the error loop
Expected Behavior
When the gateway receives Invalid signature in thinking block from the LLM provider:
- Strip all thinking blocks from the current session history
- Retry the original request
- Log a warning for audit purposes (e.g.,
[session] thinking blocks stripped due to invalid signature, retrying)
Current Behavior
The gateway forwards the error to the end user and does not retry or recover.
Impact
- Agent session becomes permanently stuck until manual
/reset
- All in-flight tool calls and pending messages are lost
- Affects production agent workloads silently (the error may be invisible to operators)
Suggested Recovery Config (optional)
Could be gated behind a config flag:
{
"compaction": {
"recoverInvalidThinkingBlocks": true
}
}
Default true seems safe since the alternative is a hard failure.
Environment
- OpenClaw 2026.5.27 (27ae826)
- Model: anthropic/claude-opus-4-6 with
thinking: adaptive
- Triggered after fleet update to claude-opus-4-6
- Session context at ~7% of 1M limit (compaction.mode: safeguard did not trigger)
Problem
When
thinking: adaptiveis enabled and a session has accumulated signed thinking blocks, a model version update (or TTL expiry) can invalidate those signatures. The gateway currently has no recovery path for this error:The session enters a permanent loop — every subsequent message re-attempts the same request with the corrupt history, failing repeatedly. The only workaround is a manual
/resetcommand, which loses session context.Steps to Reproduce
thinking: adaptiveon an agentExpected Behavior
When the gateway receives
Invalid signature in thinking blockfrom the LLM provider:[session] thinking blocks stripped due to invalid signature, retrying)Current Behavior
The gateway forwards the error to the end user and does not retry or recover.
Impact
/resetSuggested Recovery Config (optional)
Could be gated behind a config flag:
{ "compaction": { "recoverInvalidThinkingBlocks": true } }Default
trueseems safe since the alternative is a hard failure.Environment
thinking: adaptive