/compact cannot recover a session after the CAPI Responses payload reaches the 5 MB limit`
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
Description
When a Copilot CLI session reaches the 5 MB CAPI Responses request limit, normal prompts fail as expected—but /compact also fails. This leaves no way to reduce the active context while preserving and continuing the session. Basically this kills my session and I cannot continue in it which is a huge kill in productivity and flow.
Error
The request is too large to send through CAPI Responses. Try shortening the conversation or prompt. (5.0 MB request; 5.0 MB limit)
Environment
- GitHub Copilot CLI:
1.0.78-0 - OS: macOS
26.5.2 - Architecture:
arm64
Affected version
1.0.78-0
Steps to reproduce the behavior
Steps to reproduce
- Continue an interactive Copilot CLI session until its request context reaches 5 MB.
- Submit another prompt.
- Observe the request-size error.
- Run
/compact. - Observe that compaction cannot complete either.
Expected behavior
Expected behavior
/compact should remain usable after the normal request limit is reached, perhaps by truncating or chunking context locally before requesting a summary. The complete transcript should remain stored locally.
Ideally, Copilot CLI should also compact automatically before reaching an unrecoverable size.
Actual behavior
Both regular prompts and /compact are blocked. The session history still exists, but the session cannot be continued; the only practical workaround is starting a new session and manually transferring context.
Additional context
Additional detail
This occurs when the UI reports only approximately 69–70% context usage (about 1.1M context shown), rather than near 100%.
The context meter appears to track token capacity, while CAPI applies a separate 5 MB serialized-request limit. The CLI neither warns about this lower effective limit nor compacts before reaching it.
I have attached a screenshot showing the session at 70% context when the failure occurred.
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
Bắt đầu bằng cách tái hiện lỗi trong một phiên Copilot CLI tương tác khi yêu cầu CAPI Responses chạm giới hạn 5 MB, sau đó chạy /compact. Truy vết các đường dẫn xử lý việc nén ngữ cảnh và kích thước yêu cầu; công việc được xem là hoàn tất khi /compact có thể giảm ngữ cảnh và tiếp tục phiên hiện tại, trong khi toàn bộ bản ghi vẫn được lưu trữ cục bộ.
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
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100