github / github/copilot-cli

Prefer native Responses API compaction when available

Đang mở
#2,558 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:context-memory area:models
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 feature or problem you'd like to solve

I've been trying to understand how long sessions behave in Copilot CLI, especially once `/compact` or auto-compaction kicks in.

Right now, it seems like compaction goes through Copilot CLI's own summary/checkpoint flow even when the active model is OpenAI-backed and already using the Responses stack. I'd love to see the CLI prefer native Responses API compaction in those cases, and only fall back to the current Copilot compaction when native support is not available.

### Proposed solution

If the selected provider/model supports native compaction through the Responses API, use that path by default. If not, keep the current Copilot compaction as the fallback.

That feels like the best of both worlds: the current implementation keeps working everywhere, but OpenAI-backed sessions can preserve more of the provider's native behavior during very long runs.

A small config switch would also be nice, something along the lines of `auto | native | copilot`, but even just making `auto` prefer native compaction would already be a big improvement.

### Example prompts or workflows

- Long debugging sessions with lots of shell commands, edits, and tool calls
- Extended GPT-5 / Codex workflows where `/compact` may run more than once
- Research-heavy sessions that build up a lot of intermediate state over time
- Comparing the same workflow between Copilot CLI and other Responses-based harnesses

### Additional context

This is not a request to remove the current compaction/checkpoint system. That still makes sense as a universal fallback.

The request is mainly about letting OpenAI-backed sessions take advantage of provider-native compaction when it's already available.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách lần theo các luồng `/compact` và tự động thu gọn trong Copilot CLI, đồng thời xác định cách provider và model đang hoạt động công khai khả năng hỗ trợ Responses API. So sánh các đường đi native và Copilot hiện tại, sau đó xác định hành vi fallback và xác minh rằng các phiên dài sử dụng tính năng thu gọn native khi có thể, mà không làm hỏng các provider không được hỗ trợ.

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
api, cli
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
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
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.