github / github/copilot-cli

Ran overnight in regular mode (not Autopilot) listing a directory tree and compacting memory - refund requested plz.

未關閉
#3,216 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:context-memory area:sessions
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### 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_

貢獻指南

開啟貢獻指南

研究方向

No source files, tests, or entry points are named in the report. Start by investigating long-session context compaction with a PDF attachment near the context limit and observe whether repeated directory listing and compaction occur; done means the session does not run indefinitely and instead terminates or shows a visible stuck message.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
ai, cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。