Ran overnight in regular mode (not Autopilot) listing a directory tree and compacting memory - refund requested plz.
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
### 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_
Guía de contribución
Línea de trabajo
El informe no menciona archivos fuente, pruebas ni puntos de entrada. Empieza investigando la compactación del contexto en sesiones largas con un archivo adjunto PDF cerca del límite de contexto y observa si se repiten el listado de directorios y la compactación; se considera terminado cuando la sesión no se ejecuta indefinidamente, sino que termina o muestra un mensaje visible de bloqueo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- ai, cli
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100