github / github/copilot-cli

Bug Report: Bash tool fails to create PTY sessions in iTerm2 (macOS)

Abierto
#2,726 0 comentarios 1 reacción 0 asignados Ver en GitHub
area:tools
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

**Version:** GitHub Copilot CLI 1.0.27 (npm install)

**OS:** macOS, Apple Silicon (arm64)

**Terminal:** iTerm2 (`TERM_PROGRAM=iTerm.app`, `TERM=xterm-256color`)

**Shell:** zsh 5.9

---

## Description

The bash tool (used by the agent to run shell commands) completely fails to spawn PTY sessions. Every command attempted immediately returns an invalid shell ID with "no active shell sessions", producing zero output. This makes the agent unable to execute any shell commands.

**The `!` shell command prefix works fine**, meaning process spawning itself is not the issue — only the PTY-based bash tool is broken.

**Does NOT reproduce** when running Copilot CLI from VS Code (same machine, same user).

## Expected Behavior

Shell commands execute normally as they do in VS Code.

## Workarounds Attempted (none helped)

- Reinstalled via npm
- Launched with `PAGER=` unset
- Launched with `TERM_PROGRAM=` unset
- Relaunched multiple times

## Environment

- `TERM_PROGRAM=iTerm.app`
- `TERM=xterm-256color`
- `SSH_TTY` — empty (not SSH)
- `ulimit -u` (max processes): 2666
- `ulimit -n` (file descriptors): 10240

### Affected version

GitHub Copilot CLI 1.0.27.

### Steps to reproduce the behavior

1. Open iTerm2 on macOS
2. Launch `copilot` in a git repository
3. Ask the agent to run any shell command (e.g. "run git branch")
4. Observe: shell ID is immediately invalid, no output ever produced

### Expected behavior

_No response_

### Additional context

-macOS
- iterm2, reproduced with native terminal too

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza reproduciendo el fallo de PTY en iTerm2 en macOS con Copilot CLI 1.0.27 y, después, compáralo con VS Code y el ! shell command que funciona. Rastrea la creación de la sesión PTY de la herramienta bash y el comportamiento ante un ID de shell no válido; se considera terminado cuando los comandos de shell producen salida normalmente en iTerm2 y en entornos de terminal nativos.

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

Evaluación

Stack tecnológico
shell
Área
cli, operating-systems
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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.