Secret filtering can block the CLI UI thread
- 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
Copilot CLI does secret scanning synchronously on the UI thread, which can freeze the TUI if taking too long. This can easily happen if the response objects are large because of the single threaded scanning. Also, scanning the response as structured objects with recursion is much slower than scanning by treating it as a single string.
In my situation, the freezing was worsened by the fact Copilot attempted to replay and submit past events when a session was resumed. Up to 500 events will be scanned for secrets at a time with scheduled batches, all happening on the UI thread and causing noticeable TUI freezing. What's more, if the remote submission fails, it will repeatedly scan the same 500 events for up to 5 times
### Affected version
1.0.64-3
### Steps to reproduce the behavior
Make some tool calls with large responses, and observe the TUI freezing
### Expected behavior
TUI shouldn't freeze regardless of the size of the responses or whether they are strings or structured data
### Additional context
_No response_
Guía de contribución
Línea de trabajo
Comienza localizando la ruta síncrona de secret-scanning utilizada por la CLI UI y por el flujo de replay de reanudación de sesión y envío por lotes. Reproduce el bloqueo con respuestas estructuradas grandes y sesiones reanudadas, y verifica después que el escaneo ya no bloquee la TUI y que los envíos fallidos no vuelvan a escanear repetidamente los mismos eventos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- cli, performance, security
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100