github / github/copilot-cli

Frequent crashes on WSL2 ARM64: setRawMode EIO kills sessions mid-work

Abierto
#2,379 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:platform-linux area:terminal-rendering
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

## Description

Copilot CLI crashes frequently on WSL2 (Ubuntu 24.04, aarch64) with `setRawMode EIO` errors. The process loses its stdin connection mid-session and shuts down. This is happening multiple times per day — 21 crashes in the past 8 days, with 13 on a single day.

This is distinct from #2088 (React hooks rendering error). The crash signature here is a terminal stdin disconnection, not a rendering bug.

## Environment

- **OS:** Ubuntu 24.04.4 LTS on WSL2
- **Kernel:** 6.6.87.2-microsoft-standard-WSL2
- **Architecture:** aarch64 (ARM64)
- **Terminal:** VS Code Insiders integrated terminal (github.copilot-chat v0.42.2026032703)
- **Node.js:** v18.19.1
- **Copilot CLI:** 1.0.13-1 (installed via `npm install -g @github/copilot`)
- **Shell:** bash

## Crash Signature

From the process logs (`~/.copilot/logs/process-*.log`):

```
2026-03-28T18:20:57.662Z [DEBUG] [shutdown] Starting dispose: InkInstance.rerender
2026-03-28T18:20:57.679Z [DEBUG] Ignoring transient stdin error: setRawMode EIO
2026-03-28T18:20:57.679Z [INFO] Unregistering foreground session: fd8423ed-...
```

The pattern is consistent across all 21 crashes:
1. Session is running normally (often during background agent work or tool calls)
2. `setRawMode EIO` — stdin connection to the terminal is severed
3. Session shuts down, losing all in-progress work

## Frequency

| Date | Crashes |
|------|---------|
| 2026-03-21 | 1 |
| 2026-03-23 | 2 |
| 2026-03-25 | 1 |
| 2026-03-26 | 1 |
| 2026-03-27 | 2 |
| 2026-03-28 | 13 |
| 2026-03-29 | 1 |

The acceleration on Mar 28 correlates with heavier usage (multi-agent workflows with `--agent` flag), but crashes also occur during simple single-agent sessions.

## Reproduction

Not reliably reproducible on demand, but happens consistently during extended sessions (10-60 minutes). More frequent when:
- Using `copilot --agent squad` (custom agent with sub-agent spawning)
- Multiple background tool calls running in parallel
- Sessions lasting >15 minutes

## What I've Tried

- **Version pinning:** Does not work. All npm versions (`@github/copilot@1.0.5` through `@latest`) and all GitHub Release tags (`v1.0.5` through `v1.0.12`) deliver the identical 1.0.13-1 binary. Old binaries are not preserved in the registry.
- **Clean reinstall:** `npm cache clean --force` + `sudo npm install -g @github/copilot@latest` — crashes persist
- **Removing duplicate installs:** Had both curl (`~/.local/bin/copilot`) and npm (`/usr/local/bin/copilot`) — removed curl install, no improvement
- **`--no-auto-update`:** Using this flag to prevent mid-session updates

## Expected Behavior

Sessions should survive stdin interruptions gracefully (reconnect or buffer) rather than terminating. At minimum, the CLI should save session state before shutting down so `--resume` can recover.

## Additional Context

- Related: #2088 (React hooks error, different crash signature but also on WSL2)
- Related: #2217 (CLI resilience to crashes, requests better recovery)
- Context utilization at crash time is typically 5-17% — this is NOT a context overflow issue
- The EIO error suggests the WSL2↔Windows terminal pipe is being dropped, possibly by the VS Code terminal host

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.