Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#772 2 comentarios 1 reacción 1 asignado Ver en GitHub

@jmoseley ya está trabajando en esto.

Desde el 16/3/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Java
Estrellas
10.5k
Forks
1.5k
Merge medio
1 d 9 h
PR fusionados (30 d)
130

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/copilot-sdk

Todos los issues de github/copilot-sdk

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.