Skip to content

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

Closed as not planned

Description

@1837620622

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

Activity

  1. github-actions commented on Sep 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is specifically about the idle/restart resume path (rather than mid-session model switching), it may still warrant a separate fix, but please check those issues first and add details there if they cover your case.

  2. 1837620622 commented on Sep 14, 2026

    @1837620622
    Author

    Fix in #48918

  3. Joelincn commented on Sep 14, 2026

    @Joelincn

    Same error reproduced via a third trigger — egress rotation, no model switch, no idle needed. Details posted in #48805 (comment above): load-balanced egress across 3 Singapore ASNs, socket closed then ~10s later the encrypted_content caller 400, session permanently bricked. Endorsing the drop-and-retry proposal here.

  4. Vargas876 commented on Sep 15, 2026

    @Vargas876

    Same error on OpenCode Desktop (Windows 11), confirming a fourth trigger: it happens mid-session without idle and without model switching, and after several turns escalates until the session is bricked (HTTP 400, \isRetryable: false).

    Additional data points from the desktop app event store (\opencode.global.dat, 55 occurrences across 00:23-23:47 local):

    Also tested and NOT effective: upgrading desktop 1.18.21 -> 1.18.31, model options \store:false\ + \include:[reasoning.encrypted_content],
    easoningEffort:none\ +
    easoningSummary:auto, and deleting all 160+
    easoningEncryptedContent\ blobs from the DB (they regenerate each turn, so the error returns). Fresh /new\ session is the only working workaround, confirming history replay is the trigger.

    Endorsing the fix in #48918 (drop
    easoningEncryptedContent/itemId and retry). Our case is fully covered by the same recovery path.

  5. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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