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
[BUG] Forking an existing session replays incompatible reasoning.encrypted_content #37444
Open an existing session that contains reasoning output from the model above.
Fork the session from an earlier user message.
Continue the new fork with the same model.
The request fails with the encrypted-content prefix error.
Actual behavior
The fork copies the source reasoning part's provider metadata, including itemId and reasoningEncryptedContent. The copied encrypted state is replayed from the new session and rejected by the endpoint.
Expected behavior
The fork should retain the visible conversation and reasoning summary, but it should not reuse opaque reasoning continuation state from the source session.
Verification
I tested a local patch against a backup of the affected OpenCode database:
Before the patch, a new fork reproduced the error.
After removing itemId and reasoningEncryptedContent from copied reasoning metadata, a new fork continued successfully with the same model.
The source session remained unchanged.
The patch also includes a regression test covering source-session preservation and fork metadata sanitization.
Thanks for updating the issue! It now meets our contributing guidelines — the bug report is clear, includes environment details, reproduction steps, and a verified patch. We appreciate the thorough write-up.
Activity
github-actions commentedon Jul 17, 2026
Thanks for updating the issue! It now meets our contributing guidelines — the bug report is clear, includes environment details, reproduction steps, and a verified patch. We appreciate the thorough write-up.
github-actions commentedon Sep 17, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.