You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using gpt 5.6 luna on go (terminal) and suddenly it shows me:
Error from provider (Console Go): Upstream request failed: [invalid_encrypted_content] The encrypted content gAAA...kifQ could not be verified. Reason: Encrypted content could not be decrypted or parsed.
new sessions work fine, but this specific session stops, sending a new message gives the same error
Plugins
No response
OpenCode version
1.18.18
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
powershell
Reacted by yueban, suse-coder, nicksweeney and tamasys
OpenCode version is empty — please include the version you are running (visible in the TUI footer or via opencode --version)
Operating System and Terminal are empty — these help narrow down platform-specific issues
Steps to reproduce is empty — please describe what you did leading up to the error (e.g. how long the session ran, what model/mode was active, whether any tool calls were made)
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
Thank you for updating the issue! It now includes the key details we need (version, OS, terminal, and a clear description of the error). The needs:compliance label has been removed. We appreciate you taking the time to fill this out.
I can reproduce the same issue on Windows with OpenCode Go and GPT-5.6 Luna.
Environment:
OpenCode Desktop: 1.18.18
OS: Windows
Provider: opencode-go / Console Go
Model: gpt-5.6-luna
Variant: high
My Go subscription quotas are not exhausted:
Rolling: 0%
Weekly: 18%
Monthly: 11%
Additional verification:
A fresh request to https://opencode.ai/zen/go/v1/responses with the same API key succeeds with HTTP 200.
Replaying an old reasoningEncryptedContent stored in an affected session reproduces invalid_encrypted_content.
Multiple existing sessions fail, while the problem is tied to their stored Responses reasoning metadata.
The logs also show connection resets/timeouts before the encrypted-content errors.
This appears to be stale or incompatible reasoning.encrypted_content being replayed from an existing session. The client may need to invalidate or omit opaque reasoning continuation metadata when it can no longer be verified.
Reacted by abdullahaldarwish, 李建琛, yueban and nicksweeney
I performed a controlled comparison after my previous comment.
A minimal request to https://opencode.ai/zen/go/v1/responses using the same Go credentials and gpt-5.6-luna succeeds with HTTP 200.
Replaying an old reasoningEncryptedContent stored in an affected OpenCode session reproduces the same HTTP 400 error: invalid_encrypted_content.
Multiple existing sessions are affected, while fresh sessions work normally.
The affected sessions contain opaque reasoningEncryptedContent and itemId metadata from previous Responses API outputs.
The logs show connection resets/timeouts before the encrypted-content errors.
This appears to be related to stale or incompatible reasoning.encrypted_content being replayed when an existing session is continued. This is also related to the behavior described in #37444.
A possible fix would be for OpenCode to invalidate or omit opaque reasoning continuation metadata when the provider rejects it, then retry using the visible conversation history only. The UI should also provide a recoverable session error instead of leaving the existing session permanently unusable.
Also confirming this issue occurring on existing Luna conversations with up-to-date OpenCode. It persists even through forking and reverting conversations to earlier states. Fresh sessions work fine.
Aside from the central failure, this highlights an ongoing issue with user-facing error messages in OpenCode that don't provide context and don't provide any next steps for the user.
Workaround for now: use /debug in your conversation to get the session ID (ses_XXXXXXX), and copy it. Start a new conversation with something like "We're continuing from conversation ses_XXXXXXX, please read it for context." Worked well enough to get back on track.
Activity
github-actions commentedon Aug 19, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
opencode --version)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
invalid_encrypted_contenterror on an OpenCode Go/Zen session that keeps failing but new sessions work fine (closed)reasoning.encrypted_content— related root causeIf you believe this was flagged incorrectly, please let a maintainer know.
yueban commentedon Aug 19, 2026
+1, encountered the same error:
github-actions commentedon Aug 19, 2026
Thank you for updating the issue! It now includes the key details we need (version, OS, terminal, and a clear description of the error). The needs:compliance label has been removed. We appreciate you taking the time to fill this out.
Arbeiter-bit commentedon Aug 19, 2026
I can reproduce the same issue on Windows with OpenCode Go and GPT-5.6 Luna.
Environment:
My Go subscription quotas are not exhausted:
Additional verification:
https://opencode.ai/zen/go/v1/responseswith the same API key succeeds with HTTP 200.reasoningEncryptedContentstored in an affected session reproducesinvalid_encrypted_content.This appears to be stale or incompatible
reasoning.encrypted_contentbeing replayed from an existing session. The client may need to invalidate or omit opaque reasoning continuation metadata when it can no longer be verified.redjiang commentedon Aug 19, 2026
same issue
AnonymisedFellow commentedon Aug 19, 2026
same issue!!!
suse-coder commentedon Aug 19, 2026
same
Arbeiter-bit commentedon Aug 20, 2026
Additional findings
I performed a controlled comparison after my previous comment.
https://opencode.ai/zen/go/v1/responsesusing the same Go credentials andgpt-5.6-lunasucceeds with HTTP 200.reasoningEncryptedContentstored in an affected OpenCode session reproduces the same HTTP 400 error:invalid_encrypted_content.reasoningEncryptedContentanditemIdmetadata from previous Responses API outputs.This appears to be related to stale or incompatible
reasoning.encrypted_contentbeing replayed when an existing session is continued. This is also related to the behavior described in #37444.A possible fix would be for OpenCode to invalidate or omit opaque reasoning continuation metadata when the provider rejects it, then retry using the visible conversation history only. The UI should also provide a recoverable session error instead of leaving the existing session permanently unusable.
tamasys commentedon Aug 20, 2026
Also confirming this issue occurring on existing Luna conversations with up-to-date OpenCode. It persists even through forking and reverting conversations to earlier states. Fresh sessions work fine.
Aside from the central failure, this highlights an ongoing issue with user-facing error messages in OpenCode that don't provide context and don't provide any next steps for the user.
tamasys commentedon Aug 20, 2026
Workaround for now: use
/debugin your conversation to get the session ID (ses_XXXXXXX), and copy it. Start a new conversation with something like "We're continuing from conversation ses_XXXXXXX, please read it for context." Worked well enough to get back on track.