copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

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

Open edeslaurSTOXX opened this issue 6 months ago • 1 comments

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

edeslaurSTOXX avatar May 09 '26 12:05 edeslaurSTOXX

You were doing this ALL NIGHT. WHAT WERE YOU DOING? ● Compacting conversation history...

● List directory .
54 files found

● List directory
6 files found

● List directory .
54 files found

● List directory
6 files found

● Compacting conversation history...

● List directory .
54 files found

● List directory
6 files found

● List directory .
54 files found

● List directory
6 files found

● Compacting conversation history...

● List directory
6 files found

● List directory libs
3 files found

● List directory
6 files found

● List directory \PDFDownloader
20 files found

● Compacting conversation history...

edeslaurSTOXX avatar May 09 '26 12:05 edeslaurSTOXX