session.resume fails with 'Session file is corrupted' when attachments field is null
@jmoseley is already working on this.
Since Mar 16, 2026.
Assessment
This issue has not been assessed yet.
Description
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
- Create a session (with SDK version that stores
attachments: nullin the session file) - Save the session ID
- On a new run, call
session.resumewith the saved session ID - Observe the error above
Expected Behavior
Either:
- The SDK accepts
nullas a valid (empty) value forattachmentsduring 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-sdkversion: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.
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 131
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.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
-
bug testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/copilot-sdk#2628 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2627 · 1 comment ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/copilot-sdk#2493 ·
All issues in github/copilot-sdk
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100