session.resume fails with 'Session file is corrupted' when attachments field is null
@jmoseley 已经在做这个了。
开始于 2026年3月16日。
评估
这个 Issue 还没有评估数据。
描述
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.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 130
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
area/plugin
难度 2/5 1-3 小时 新手友好度 75/100
kestra-io/plugin-kestra#190 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
apache/rocketmq-dashboard#5064 ·