anomalyco / anomalyco/opencode

Muse Spark 1.3: resuming a session after idle fails with reasoning encrypted_content not issued to this caller

Open
#48,915 5 comments 5 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Sep 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Resuming an old session on opencode/muse-spark-1.3-contributor-free fails immediately with:

Error from provider (Console): Upstream request failed: [invalid_request_error] reasoning `encrypted_content` was not issued to this caller

A new session with the same model works. Continuing a session after idle, or after using another model then switching back to Muse 1.3, always fails until /new.

OpenCode stores metadata.openai.reasoningEncryptedContent + itemId on reasoning parts and replays them. Those blobs are bound to the Zen/Console caller and expire. HTTP 400 is treated as fatal, so the session stays bricked.

Related: #48741 (image/tool call), #48805 (mid-session model switch). This report is specifically resume-after-idle on 1.18.30.

Plugins

opencode-pty, opencode-websearch-cited@1.2.0

OpenCode version

1.18.30

Steps to reproduce
  1. Start a session with opencode/muse-spark-1.3-contributor-free and send a few messages (or mix in another model, then switch back).
  2. Leave the session idle for a while, or fully restart OpenCode.
  3. Reopen that same session and send another message with Muse 1.3.

Expected: request succeeds, history stays.
Actual: every retry returns the encrypted_content caller error.

Log:

timestamp=2026-09-14T03:07:17.902Z level=ERROR message="stream error" providerID=opencode modelID=muse-spark-1.3-contributor-free session.id=ses_f6b39b16bffeVTjvIwrR2SLez7 error.error="AI_APICallError: Error from provider (Console): Upstream request failed: [invalid_request_error] reasoning `encrypted_content` was not issued to this caller"

Stored part shape (reasoning, part table):

{
  "type": "reasoning",
  "text": "...",
  "metadata": {
    "openai": {
      "itemId": "rs_...",
      "reasoningEncryptedContent": "..."
    }
  }
}

Please drop reasoningEncryptedContent / reasoning itemId when the provider rejects them, persist the cleaned parts, and retry. Same class of recovery as the Claude stale-thinking handling.

Screenshot and/or share link

N/A. Error is from the Console provider before any stream output.

Operating System

macOS (darwin arm64)

Terminal

OpenCode TUI

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.