Side chat doesn't restore the parent thread's model_provider, so it fails with invalid_encrypted_content
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.911.61220
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.6.0 arm64 arm
What issue are you seeing?
Opening a side chat on a thread created on the ChatGPT plan fails on the first message once the default provider is Azure:
{
"error": {
"message": "The encrypted content for item rs_...79a could not be verified. Reason: Encrypted content could not be decrypted or parsed.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_encrypted_content"
}
}
The side chat's first request goes to the Azure endpoint (POST https://<resource>.openai.azure.com/openai/responses?api-version=2025-04-01-preview → 400 Bad Request). That request carries reasoning item rs_...79a, which the parent thread received from the ChatGPT backend.
What steps can reproduce the bug?
- With
model_provider = "openai"(ChatGPT sign-in), start a thread in Codex Desktop and run a few turns with a reasoning model so the history contains encrypted reasoning items. - Add a custom Azure provider (
wire_api = "responses"), setmodel_provider = "azure", and restart the app. - Reopen the thread from step 1. It resumes on
openai, as expected. - Open a side chat on that thread and send any message.
Result: the first turn fails with invalid_encrypted_content, and the request goes to the Azure endpoint.
What is the expected behavior?
A side chat should run on its parent thread's provider unless the client explicitly asks for a different one. This is the rule thread/resume followed since #19287. If the client does explicitly switch providers, encrypted reasoning and compaction items from the other provider should be dropped, not sent to an endpoint that can't decrypt them.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing side-chat creation and the thread/resume provider-handling path, using the rule described in #19287 as a comparison. Done means a side chat inherits its parent provider by default, while an explicit provider switch does not send incompatible encrypted reasoning or compaction items to the new endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100