github / github/copilot-cli

/compact cannot recover a session after the CAPI Responses payload reaches the 5 MB limit`

Abierto
#4,424 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

area:context-memory area:sessions
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
Description

When a Copilot CLI session reaches the 5 MB CAPI Responses request limit, normal prompts fail as expected—but /compact also fails. This leaves no way to reduce the active context while preserving and continuing the session. Basically this kills my session and I cannot continue in it which is a huge kill in productivity and flow.

Error

The request is too large to send through CAPI Responses. Try shortening the conversation or prompt. (5.0 MB request; 5.0 MB limit)

Environment
  • GitHub Copilot CLI: 1.0.78-0
  • OS: macOS 26.5.2
  • Architecture: arm64

Image

Affected version

1.0.78-0

Steps to reproduce the behavior

Steps to reproduce

  1. Continue an interactive Copilot CLI session until its request context reaches 5 MB.
  2. Submit another prompt.
  3. Observe the request-size error.
  4. Run /compact.
  5. Observe that compaction cannot complete either.
Expected behavior

Expected behavior

/compact should remain usable after the normal request limit is reached, perhaps by truncating or chunking context locally before requesting a summary. The complete transcript should remain stored locally.

Ideally, Copilot CLI should also compact automatically before reaching an unrecoverable size.

Actual behavior

Both regular prompts and /compact are blocked. The session history still exists, but the session cannot be continued; the only practical workaround is starting a new session and manually transferring context.

Additional context

Additional detail

This occurs when the UI reports only approximately 69–70% context usage (about 1.1M context shown), rather than near 100%.

The context meter appears to track token capacity, while CAPI applies a separate 5 MB serialized-request limit. The CLI neither warns about this lower effective limit nor compacts before reaching it.

I have attached a screenshot showing the session at 70% context when the failure occurred.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza reproduciendo el fallo en una sesión interactiva de Copilot CLI cuando la solicitud de CAPI Responses alcanza el límite de 5 MB y, después, ejecuta /compact. Rastrea las rutas de compactación y gestión del tamaño de la solicitud; se considera terminado cuando /compact puede reducir el contexto y continuar la sesión existente, mientras la transcripción completa permanece almacenada localmente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell
Área
cli
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.