Skip to content

OpenCode Go: existing GPT-5.6 Luna sessions fail with invalid_encrypted_content #43557

Description

@Arbeiter-bit

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:

  1. Invalidate or remove the affected reasoning.encrypted_content and itemId.
  2. Retry using only the visible conversation history.
  3. Avoid copying opaque provider-specific reasoning metadata during session continuation or forking.
  4. 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

  1. Use OpenCode Desktop on Windows.
  2. Select opencode-go / Console Go.
  3. Select gpt-5.6-luna with the high reasoning variant.
  4. Open an existing multi-turn session containing previous GPT Responses output.
  5. Send a new message.
  6. The request fails with invalid_encrypted_content.
  7. Start a fresh session with the same model and provider; the request succeeds.
  8. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions