You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opencode free-tier (muse-spark-1.3): same-model replay of encrypted_content rejected on turn 2 — upstream invalidates its own reasoning token #9634
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
Fresh pi session, provider opencode, model muse-spark-1.3-contributor-free, reasoning effort medium.
Send any message → turn 1 succeeds.
Send a second message → 400 reasoning encrypted_content was not issued to this caller.
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.
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.
Activity
github-actions commentedon Sep 15, 2026
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
lgtmion one of your issues, your future issues will stay open. If a maintainer replieslgtm, your future issues and PRs will stay open. The command must be at the start of the reply (optionally after one or more@usernamementions) or at the end.See CONTRIBUTING.md.
davidbrai commentedon Sep 17, 2026
I tried to reproduce with opencode/muse-spark-1.3-contributor (the free one is blocked) and I couldn't, work fine