Cold resume can replay undecryptable encrypted reasoning without a safe fallback
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- backend-api-design
Direzione di ricerca
Inizia dai percorsi di runtime responsabili della serializzazione del replay, dello stato del turno in sospeso e dell’ordine degli effetti collaterali, usando la riproduzione con il fixture del provider deterministico descritta nell’issue. Il lavoro è completo quando un errore strutturato di decrypt/parse può attivare un retry atomico prima dell’effetto collaterale senza duplicare l’evento dell’utente, mentre le riprese successive evitano il prefisso invalidato e gli errori non correlati o ripetuti rimangono terminali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
When a cold-resumed session preserves prior reasoning fields, the first model request can fail with HTTP 400 if the provider can no longer validate the replayed encrypted_content:
Encrypted content ... could not be decrypted or parsed.
The logical model identifier can remain unchanged while the provider's underlying deployment or encryption domain changes. The SDK currently treats this as a terminal session error. Consumers cannot atomically remove the incompatible pre-resume reasoning, retry the pending turn, and prevent the same payload from being replayed on later resumes.
This leaves consumers with two unsafe choices:
- Strip reasoning on every resume, losing reasoning continuity and prefix-cache reuse.
- Preserve reasoning on every resume, leaving the session unrecoverable when a previously valid blob becomes unverifiable.
This is related to #615, which correctly preserved encrypted_content for stateless multi-turn requests. Preservation should remain the normal path, with a bounded recovery path for blobs that a provider can no longer verify.
Versions and configuration
- Reproduced with the resume behavior in
@github/copilotCLI 1.0.78. - The same relevant behavior is present in CLI 1.0.73.
- Prior reasoning is preserved on resume by setting
COPILOT_STRIP_REASONING_ON_RESUME=false. - The provider uses a stable logical model name but may route requests across compatible model deployments.
Reproduction
A provider fixture can reproduce the failure deterministically:
- Create a session with a reasoning model.
- Complete a turn whose assistant reasoning contains
encrypted_content. - Disconnect and cold-resume the session with reasoning preservation enabled.
- Send the next user message.
- Have the provider reject the replayed blob with HTTP 400 and the decrypt/parse error above.
Actual behavior
The resumed turn fails terminally. A generic consumer retry reuses the same incompatible history. The public SDK API does not provide an atomic way to sanitize the resumed prefix without risking a duplicate user event or repeated tool side effects.
Expected behavior
The SDK should preserve reasoning by default, but recover safely when the first post-resume call proves that prior encrypted reasoning is incompatible.
One possible design is a resume policy such as preserveWithStripFallback:
- Match only the structured HTTP 400 decrypt/parse failure, not every encrypted-content or invalid-request error.
- Recover only before assistant output or tool execution has started.
- Atomically strip incompatible pre-resume opaque reasoning and retry the same pending turn once.
- Do not append the user event twice.
- Persist an invalidation cutoff or generation so later resumes do not replay the poisoned prefix.
- Continue preserving reasoning generated after recovery.
- If available, use an opaque provider-issued verification-domain identity to avoid replay proactively when compatibility does not match.
Unrelated errors, failures after side effects, and a failed recovery attempt should remain terminal. The retry must never loop.
Why this belongs in the runtime
The runtime owns replay serialization, pending-turn state, and side-effect ordering. Handling this outside the SDK cannot reliably distinguish a safe first-call recovery point or rewrite session history atomically.
This recovery keeps the cache and multi-turn reasoning benefit for healthy resumes. Only a session with incompatible ciphertext loses its old hidden-reasoning prefix once, after which newly generated reasoning can be preserved normally.
- Lingua principale
- Java
- Stelle
- 10.5k
- Fork
- 1.5k
- Merge medio
- 1g 9h
- PR unite (30g)
- 130
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/copilot-sdk
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2760 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2759 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/copilot-sdk#2709 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
github/copilot-sdk#2673 ·
Tutte le issue di github/copilot-sdk
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·
-
Consent portal: creating a duplicate Purpose shows a generic error instead of "already exists" Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
wso2/dpdp-accelerator#287 ·