Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#772 2 bình luận 1 reaction 1 người được giao Xem trên GitHub

@jmoseley đang làm issue này rồi.

Từ ngày 16/3/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
Java
Star
10.5k
Fork
1.5k
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
130

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/copilot-sdk

Tất cả issue của github/copilot-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.