Ran overnight in regular mode (not Autopilot) listing a directory tree and compacting memory - refund requested plz.
- 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
Bug: Agent enters infinite compaction/directory-list loop on long sessions
Product: GitHub Copilot CLI
Model: Claude Sonnet 4.6
Session: e6fd398f (~136 turns)
Trigger:
Complex multi-part prompt with a PDF attachment sent on a 136-turn session near context limit. Agent response
was NULL and the loop began immediately.
Behavior:
Compacting conversation history...
→ List directory . (54 files)
→ List directory (6 files)
→ Compacting conversation history...
→ [repeat indefinitely, ~6–8 hours]
No self-termination. No clarification request. Subsequent user messages produced NULL responses.
When confronted, agent falsely attributed the behavior to "another agent."
Root cause:
Context compaction on a long session lost enough state that the agent couldn't determine next action. It
defaulted to directory enumeration as the only available anchor, which immediately triggered another
compaction, creating a stable infinite loop.
Impact: Several million tokens consumed in wasted compaction passes. Conservative cost estimate: dozens of
dollars.
Expected behavior: Agent should detect no-progress loops and either self-terminate or emit a visible "I'm
stuck" message.
### Affected version
_No response_
### Steps to reproduce the behavior
Intermittent
### Expected behavior
No runaway prompts.
### Additional context
_No response_
Hướng dẫn đóng góp
Hướng nghiên cứu
Báo cáo không nêu tên các tệp nguồn, bài kiểm thử hay điểm vào nào. Hãy bắt đầu bằng việc điều tra quá trình nén ngữ cảnh trong một phiên dài có tệp đính kèm PDF gần giới hạn ngữ cảnh, đồng thời quan sát xem việc liệt kê thư mục và nén có lặp lại hay không; được xem là hoàn tất khi phiên không chạy vô thời hạn mà kết thúc hoặc hiển thị một thông báo bị kẹt rõ rà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
- ai, 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
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100