Python: shutdown notification rejects 'destroy' with SDK 1.0.14 / runtime 1.0.85
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
查看 copilot/generated/session_events.py 中產生的會話事件,特別是 ShutdownType 枚舉。將允許的值與運行時發送的 'destroy' 字串進行比較。檢查協議定義或運行時原始碼,以確定哪一方是正確的。編寫一個測試來驗證修復是否處理了新值。
由索引模型根據 Issue 內容生成。
描述
Summary
After a successful two-turn conversation, deleting the session produces an
unhandled exception in the Python SDK's session notification callback:
ValueError: 'destroy' is not a valid ShutdownType
Environment
- OS: Windows
- Python: 3.12.14
- github-copilot-sdk: 1.0.14
- Runtime version reported by client.get_status(): 1.0.85
- Protocol version: 3
- Model: gpt-5-mini
The installed SDK's copilot/_cli_version.py pins CLI_VERSION = "1.0.85",
matching the runtime version reported during the run.
Observed behavior
- Initiated a session, went through 2 turns
- The adapter performed cleanup using client.delete_session(session_id),
followed by client.stop(). - During cleanup, the SDK notification callback raised the exception below.
The conversation succeeded. I have not independently verified whether session
deletion completed despite the callback exception.
Relevant traceback
CopilotClient._connect_via_stdio..handle_notification
→ session_event_from_dict
→ SessionEvent.from_dict
→ SessionShutdownData.from_dict
→ parse_enum(ShutdownType, obj.get("shutdownType"))
ValueError: 'destroy' is not a valid ShutdownType
Offline parser reproduction
This requires no authentication or model requests:
from copilot.generated.session_events import ShutdownType, parse_enum
print([item.value for item in ShutdownType])
# ['routine', 'error']
parse_enum(ShutdownType, "destroy")
# ValueError: 'destroy' is not a valid ShutdownType
This demonstrates the parser rejection, not the full live cleanup sequence.
Expected behavior
The SDK and its pinned runtime should agree on shutdown notification values,
so normal session cleanup does not produce an unhandled callback exception.
Should the runtime emit a different shutdownType, or should the SDK accept
"destroy"?
- 主要語言
- Java
- 星號
- 10.5k
- 分支
- 1.5k
- 平均合併
- 1 天 5 小時
- 30 天內合併 PR
- 108
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
難度 2/5 1-3 小時 新手友好度 68/100
github/copilot-sdk#2782 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
github/copilot-sdk#2781 ·
維護者通常 1 天內回覆
-
agentic-workflows
難度 2/5 1-3 小時 新手友好度 65/100
github/copilot-sdk#2779 ·
維護者通常 1 天內回覆
-
agentic-workflows
難度 2/5 1-3 小時 新手友好度 65/100
github/copilot-sdk#2760 · 1 則留言 ·
維護者通常 1 天內回覆
-
documentation
難度 1/5 1 小時以內 新手友好度 85/100
github/copilot-sdk#2758 ·
維護者通常 1 天內回覆
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
Content
難度 2/5 1-3 小時 新手友好度 68/100
RunestoneInteractive/rs#1559 · 1 則留言 ·
維護者通常 2 天內回覆
-
documentation
難度 2/5 1-3 小時 新手友好度 86/100
inu-appcenter/memorIN-backend#298 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 85/100
opendataloader-project/opendataloader-pdf#757 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
redhat-developer/intellij-quarkus#1626 ·