Skip to content

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

Closed as not planned

Description

@yanhenrique-dev

Description

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

Plugins

No response

OpenCode version

1.18.31

Steps to reproduce

Image

Screenshot and/or share link

No response

Operating System

Linux

Terminal

Fish

Activity

  1. github-actions commented on Sep 15, 2026

    @github-actions
    Contributor

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

    If your issue matches one of the above, please add any additional context there rather than opening a new report.

  2. Yourkaikai commented on Sep 16, 2026

    @Yourkaikai

    Same error here, adding a macOS data point (using Meta Muse Spark).

    • OpenCode version: 1.18.31 (also tested on this exact version as the reporter)
    • OS: macOS Darwin 27.0.0 arm64
    • Provider / model: Console / Muse Spark 1.3 Free, thinking level Xhigh
    • Context: normal coding session editing Tests/AtelierTests/ManuscriptLibraryTests.swift (+90 diff), then the request failed with [invalid_request_error] reasoning \encrypted_content` was not issued to this caller`
    • Sticky part: clicking Continue/Retry replays the same broken context and fails identically every time — the session is bricked, only a fresh session works.

    This looks like the same encrypted-reasoning replay class as #48805 / #48915 / #49083 (replaying a prior turn's encrypted_content that the current caller can't decrypt). Endorsing the ask from those threads: strip/drop stale encrypted_content on retry (keep summary) instead of blind retry, so one bad turn doesn't brick the whole session.

  3. yanhenrique-dev commented on Sep 17, 2026

    @yanhenrique-dev
    Author

    Yourkaikai nailed the mechanism: Continue and Retry keep replaying the same poisoned context, so the thread can never dig itself out and only a fresh session works. That exact loop is what pushed me to write a workaround instead of waiting. It is a single-file Python script with no dependencies that opens the local opencode database and strips out just the stale caller-bound reasoning material, leaving messages, tool history and file edits exactly as they were. Afterwards the bricked session opens again, minus only the hidden reasoning the server would not accept anyway. https://gist.github.com/goainwo0/5df39ec984904d082d77e3e4da4a5a6e @yanhenrique-dev @Yourkaikai tagging you both since you hit it head-on. Two practical notes. First, Yourkaikai, on your macOS point: the script asks opencode itself where the database lives and then checks the usual locations on all three OSes, so the platform difference should not matter. Second, shut opencode down before running it, the database file is locked while the app runs. I validated it against a copy of a large database, confirmed the poisoned rows were gone and plain history stayed intact, and a second run reports everything already clean. Unofficial, and the upstream recovery PRs are still pending, but it restored sessions that looked permanently dead.

    Thank you very much, this will be of great help.

  4. 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