copilot-runtime memory keeps growing when large sessions are resumed and disconnected
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, macos
- Área
- performance
Línea de trabajo
The report describes memory that is not released after a resumed session is disconnected, and it gives a repro using CopilotClient, a copied session with a large events.jsonl, and footprint -p on the runtime pid. Start with the resume and disconnect path in the SDK, then look for where the replayed session history is kept after disconnect. Done means memory returns near its baseline after repeated resume/disconnect rounds, shown by a repro that stays flat.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- SDK: @github/copilot-sdk 1.0.27-unstable.40031404408.gba6c003 (the one bundled with VS Code 1.144.0)
- copilot-runtime: 1.0.100-1
- OS: macOS 27.0, arm64
My Mac (16 GB) ran out of memory. macOS showed the Force Quit window, but the mouse and screen stopped responding, so I had to hard reboot it. In the jetsam report, two copilot-runtime processes from VS Code's agent host held 12.8 GB (up about 8 days) and 8.0 GB (up about 3 days). Something else started the actual OOM, but those two were already using more than half the RAM.
Some of my chats are long, with events.jsonl between 150 and 450 MB. So I tried to see where the memory goes. I used the SDK on its own (CopilotClient with a separate home directory and copies of my sessions) and measured with footprint -p on the runtime pid:
- Resuming a session costs about 3 times its events.jsonl: 15 MB file → +100 MB, 250 MB → +750 MB, 439 MB → +1.37 GB.
- After I disconnect the session, the memory doesn't come back. With all three resumed and then disconnected, the runtime stayed at 727 MB.
- Resuming and disconnecting the 250 MB session 14 times in a row: the footprint grew by about 46 MB each time and never came down. The same loop with the 15 MB session stayed flat over 20 rounds.
The agent host log for the 8 GB process had 55 "Evicting idle session" lines and 108 resumes. That adds up to about 7 GB of events.jsonl read back over 3 days. My guess is that each resume of a large session leaves part of the replayed history behind, and evicting an idle session and resuming it later doesn't free it. I may be wrong about the cause, but the numbers above reproduce for me every time.
Steps to reproduce
- Take a session with a large events.jsonl (a couple hundred MB).
- With the SDK, start a client, then resume and disconnect that session in a loop.
- Watch
footprint -p <copilot-runtime pid>after each round.
Expected: after a disconnect, memory goes back to roughly where it was.
Actual: it grows by tens of MB per round until the runtime is restarted.
For now I restart the agent host when it gets too big. That works because chats resume from disk.
- Lenguaje dominante
- Java
- Estrellas
- 10.7k
- Forks
- 1.5k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/copilot-sdk
-
Rust: ElicitationRequest drops the tool call id from elicitation.requestedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-sdk#2900 ·
-
Bump zod version to 4.6.6.Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
github/copilot-sdk#2876 · 1 comentario · 1 reacción ·
-
Python ModelLimits drops max_output_tokens from model metadataQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-sdk#2798 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
github/copilot-sdk#2759 ·
-
docs/AGENTS.md is repo authoring guidance, but everything in docs/ gets publishedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
github/copilot-sdk#2758 ·
Todos los issues de github/copilot-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ls1intum/thesis-management#1473 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
LunaDeerMC/Dominion#301 · 1 comentario ·
-
[FEATURE] Expose external refresh, node-level translog and warmer statsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertountriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días