Skip to content

opencode free-tier (muse-spark-1.3): same-model replay of encrypted_content rejected on turn 2 — upstream invalidates its own reasoning token #9634

Closed as not planned

Description

@egkike

What happened?

With provider opencode (Console, openai-responses-compatible) and model muse-spark-1.3-contributor-free, a fresh multi-turn session fails on the second turn with:

OpenAI API error (400): {"param":null,"type":"invalid_request_error","message":"Error from provider (Console): Upstream request failed: [invalid_request_error] reasoning `encrypted_content` was not issued to this caller"}

No model switch is involved. Turn 1 succeeds; the assistant message stores one thinking block with an empty text and a ~2.9KB thinkingSignature serializing a Responses reasoning item ({"type":"reasoning","status":"completed","encrypted_content":"...","id":"rs_<hash>:rs_<session-derived-id>"}). On turn 2 the replayed same-model reasoning item is rejected by the upstream — which is the upstream rejecting its own token issued ~2 minutes earlier in the same session. Retrying (turn 3) fails identically.

Client-side behavior looks correct: with @earendil-works/pi-ai resolved at 0.85.1, transformMessages retains same-model signed thinking (required for reasoning continuity) and drops cross-model blocks — verified locally, and cross-model switches to plain-reasoning models work fine. Validated that this is not extension-caused: the failure shape is entirely in the provider request path (convertResponsesMessages → upstream), no extension touches it.

My suspicion: the free-tier upstream rotates credentials/backends between requests, so the caller validating turn 2 is not the caller that issued the encrypted_content — a caller/session binding problem on the provider side, which the client cannot represent or fix.

Steps to reproduce

  1. Fresh pi session, provider opencode, model muse-spark-1.3-contributor-free, reasoning effort medium.
  2. Send any message → turn 1 succeeds.
  3. Send a second message → 400 reasoning encrypted_content was not issued to this caller.
  4. Any further turn keeps failing with the same 400 (the same-model signature is legitimately retained in history).

Expected behavior

The upstream should accept its own issued encrypted_content on same-model same-session replay. Failing that, a provider-level compat option to drop replayed reasoning items for this provider would at least make multi-turn sessions usable.

Version

0.85.1 (pi-ai 0.85.1)

Activity

  1. github-actions commented on Sep 15, 2026

    @github-actions
    Contributor

    This issue was auto-closed. All issues from new contributors are auto-closed by default.

    Maintainers review auto-closed issues daily and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply.

    If a maintainer replies lgtmi on one of your issues, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open. The command must be at the start of the reply (optionally after one or more @username mentions) or at the end.

    See CONTRIBUTING.md.

  2. added
    untriagedThis issue has been auto closed and has not been triaged
    on Sep 15, 2026
  3. davidbrai commented on Sep 17, 2026

    @davidbrai
    Member

    I tried to reproduce with opencode/muse-spark-1.3-contributor (the free one is blocked) and I couldn't, work fine

  4. added
    no-actionThis issue has been rejected after triage
    and removed
    untriagedThis issue has been auto closed and has not been triaged
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    no-actionThis issue has been rejected after triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions