Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

session.resume fails with 'Session file is corrupted' when attachments field is null

Aperta
#772 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

@jmoseley ci sta già lavorando.

Dal 16/3/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

batch runtime

Bug Report

Summary

Resuming a session via session.resume fails with a JSON-RPC error when the saved session file has attachments: null. The SDK now expects attachments to be an array, but previously saved sessions store null.

Error
JSON-RPC Error -32603: Request session.resume failed with message:
Session file is corrupted (line 24: data.attachments: Expected array, received null)
Steps to Reproduce
  1. Create a session (with SDK version that stores attachments: null in the session file)
  2. Save the session ID
  3. On a new run, call session.resume with the saved session ID
  4. Observe the error above
Expected Behavior

Either:

  • The SDK accepts null as a valid (empty) value for attachments during resume (backwards-compatible), or
  • A more graceful error that allows the caller to detect the corruption and fall back to starting a new session
Actual Behavior

Resume throws a hard JSON-RPC -32603 error that cannot be easily distinguished from other fatal errors, forcing the caller to start a fresh session without a clean signal.

Environment
  • github-copilot-sdk version: 0.1.32
  • Python: 3.12.3
  • OS: Linux (Ubuntu 24.04)
Suggested Fix

Treat null as equivalent to [] for the attachments field during session deserialization, to maintain backwards compatibility with older session files.

Lingua principale
Java
Stelle
10.5k
Fork
1.5k
Merge medio
1g 9h
PR unite (30g)
131

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/copilot-sdk

Tutte le issue di github/copilot-sdk

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.