Resumed session retains stale connection item IDs after interrupted response
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
Describe the bug
After reopening and resuming an existing Copilot CLI session, every prompt fails with:
Execution failed: CAPIError: 400 input item ID does not belong to this connection
The affected session does not recover after retrying. Forking it with /fork also does not help: prompts in the fork fail with the same error. A separate new Copilot CLI session works normally.
This appears to be a regression of #2147, which was closed as fixed in v1.0.10. The reported root cause there was stale WebSocket state being reused after a reconnection.
Affected version
GitHub Copilot CLI 1.0.81-0
Steps to reproduce the behavior
I am not certain of the exact trigger, but the likely sequence was:
-
Use an existing Copilot CLI session normally.
-
Exit or close the CLI while the agent is about to respond or while a response is in progress.
-
Reopen Copilot CLI and resume the existing session.
-
Enter a prompt such as
continue. -
Observe:
Execution failed: CAPIError: 400 input item ID does not belong to this connection (Request ID: 00000-ed11ed35-1761-4d58-95f1-7f22a29c4556) -
Retry the prompt and receive the same error with a new request ID:
Execution failed: CAPIError: 400 input item ID does not belong to this connection (Request ID: 00000-b4c9a489-fc2f-4b5f-921f-13a2e409f386) -
Run
/forkand try another prompt in the fork. The error persists. -
Start a separate new session. The new session works normally.
Expected behavior
Copilot CLI should discard or reconstruct connection-bound response state after reconnecting. An interrupted response should not permanently make a persisted session, or a fork of that session, unusable.
Additional context
- Operating system: Windows
- CPU architecture: ARM64
- Shell: PowerShell 7
- The original session log shows the old Copilot process shutting down and cleaning up the persisted session before it was reopened.
- The failure is isolated to the affected conversation and forks made from it.
- Restarting/reconnecting and retrying do not recover the conversation.
- A comment on #2147 reports the same failure on v1.0.79-4, suggesting the issue may have regressed before v1.0.81-0.
- I have not attached the complete session log because it contains conversation and tool history.
Investigated and filed with assistance from GitHub Copilot CLI.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp mã nguồn hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng cách lần theo luồng tiếp tục/kết nối lại của một phiên đã được lưu bền vững, bao gồm đường dẫn /fork và quá trình dọn dẹp sau một phản hồi bị gián đoạn; sử dụng chuỗi tái hiện được báo cáo và ngữ cảnh log của phiên để xác định trạng thái gắn với kết nối đang được tái sử dụng. Hoàn thành khi các phiên được tiếp tục và các fork của chúng không còn thất bại với stale input item ID error, trong khi các phiên mới vẫn tiếp tục hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli, networking
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100