fix(session): recover stale encrypted reasoning - #48918
1837620622 wants to merge 1 commit into
Conversation
Retry once after stripping caller-bound reasoning.encrypted_content when the provider rejects it, matching overflow recovery.
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found: PR #48908 - Why it might be related: Note: PR #43595 |
|
This bricks Muse Spark 1.3 on 1.18.30 when resuming an old session. Tests in packages/core session-runner pass. Please review/merge when you can. |
|
hopefully |
|
I got that error message too now, what helps is using |
|
still persists on 1.18.31. I hope this gets merged soon. |
Why this mattersResuming after idle still bricks sessions with stale EvidenceTwo open recoveries for stale encrypted reasoning (
Community still sees the brick on 1.18.31 (thread on #48918). Architecture (proposal)Maintainer call: which shape should land on |
Issue for this PR
Fixes #48915
Type of change
What does this PR do?
Resuming a Muse Spark / OpenAI Responses session after idle fails with:
OpenCode stored that caller-bound blob and treated HTTP 400 as fatal, so the session stayed bricked.
This follows the existing context-overflow recovery path:
stale-reasoningreasoningEncryptedContent/itemIdfrom stored reasoningReadable reasoning text stays. Live tool-loop encrypted state is left alone unless the provider rejects it.
Related: #48741, #48805
How did you verify your code works?
packages/llm:bun test test/provider-error.test.tspackages/opencode:bun test test/provider/error.test.tsand the fromError case intest/session/message-v2.test.tspackages/core:bun test test/session-runner.test.ts(90 pass), including three new recovery tests plus existing overflow and encrypted-reasoning testsScreenshots / recordings
n/a (non-UI)
Checklist