Description
When continuing an existing multi-turn session with OpenCode Go and GPT-5.6 Luna, the request repeatedly fails with:
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.
Multiple existing sessions are affected. Fresh sessions using the same provider, model, credentials, and subscription work normally.
My OpenCode Go subscription limits are not exhausted:
- Rolling usage: 0%
- Weekly usage: 18%
- Monthly usage: 11%
A workaround is to run /debug in the broken session, copy its session ID, start a new conversation, and ask it to continue from that session ID. The new conversation works successfully.
This suggests that the visible session data remains readable, but the original session fails when OpenCode replays stored Responses API reasoning metadata.
Related issues:
Additional verification
- A minimal request to
https://opencode.ai/zen/go/v1/responses with gpt-5.6-luna succeeds with HTTP 200.
- Replaying old
reasoningEncryptedContent stored in an affected session reproduces the same invalid_encrypted_content HTTP 400 error.
- Affected sessions contain
reasoningEncryptedContent and itemId metadata from previous Responses API outputs.
- Logs show connection resets and timeouts before the encrypted-content failures.
Possible cause
OpenCode may be replaying stale or incompatible reasoning.encrypted_content and itemId metadata when resuming an existing session.
Possible triggers include:
- An interrupted or partially completed Responses API request.
- A provider-side encryption key or format change.
- A model, provider, or authentication change.
- Session metadata being replayed after a network reset.
Possible solution
When the provider returns invalid_encrypted_content, OpenCode could:
- Invalidate or remove the affected
reasoning.encrypted_content and itemId.
- Retry using only the visible conversation history.
- Avoid copying opaque provider-specific reasoning metadata during session continuation or forking.
- Provide an automatic recovery path equivalent to starting a new conversation with the old session context.
Plugins
No OpenCode plugins. Local MCP servers are configured: Playwright and Burp MCP.
OpenCode version
1.18.18
Steps to reproduce
- Use OpenCode Desktop on Windows.
- Select
opencode-go / Console Go.
- Select
gpt-5.6-luna with the high reasoning variant.
- Open an existing multi-turn session containing previous GPT Responses output.
- Send a new message.
- The request fails with
invalid_encrypted_content.
- Start a fresh session with the same model and provider; the request succeeds.
- Alternatively, start a new session and reference the old session ID obtained from
/debug; the new session can continue successfully.
Screenshot and/or share link
https://github.com/user-attachments/assets/4b885990-2a36-4535-a2dc-8fe208e505f6
https://github.com/user-attachments/assets/11116284-194e-4f73-a57a-fefa7c23a068
Operating System
Windows
Terminal
OpenCode Desktop
Description
When continuing an existing multi-turn session with OpenCode Go and GPT-5.6 Luna, the request repeatedly fails with:
Multiple existing sessions are affected. Fresh sessions using the same provider, model, credentials, and subscription work normally.
My OpenCode Go subscription limits are not exhausted:
A workaround is to run
/debugin the broken session, copy its session ID, start a new conversation, and ask it to continue from that session ID. The new conversation works successfully.This suggests that the visible session data remains readable, but the original session fails when OpenCode replays stored Responses API reasoning metadata.
Related issues:
Additional verification
https://opencode.ai/zen/go/v1/responseswithgpt-5.6-lunasucceeds with HTTP 200.reasoningEncryptedContentstored in an affected session reproduces the sameinvalid_encrypted_contentHTTP 400 error.reasoningEncryptedContentanditemIdmetadata from previous Responses API outputs.Possible cause
OpenCode may be replaying stale or incompatible
reasoning.encrypted_contentanditemIdmetadata when resuming an existing session.Possible triggers include:
Possible solution
When the provider returns
invalid_encrypted_content, OpenCode could:reasoning.encrypted_contentanditemId.Plugins
No OpenCode plugins. Local MCP servers are configured: Playwright and Burp MCP.
OpenCode version
1.18.18
Steps to reproduce
opencode-go/ Console Go.gpt-5.6-lunawith thehighreasoning variant.invalid_encrypted_content./debug; the new session can continue successfully.Screenshot and/or share link
https://github.com/user-attachments/assets/4b885990-2a36-4535-a2dc-8fe208e505f6
https://github.com/user-attachments/assets/11116284-194e-4f73-a57a-fefa7c23a068
Operating System
Windows
Terminal
OpenCode Desktop