github / github/copilot-cli

Shell command completion never detected when running inside tmux (output appears, but command reported "still running" forever)

Đang mở
#4,223 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

When Copilot CLI runs **inside a tmux session**, shell tool commands execute and their **output appears correctly**, but the CLI **never detects command completion**. Even a trivial `echo hello` prints `hello` and then hangs indefinitely as "still running"; it must be manually stopped. Running the CLI **outside tmux**, the identical command completes immediately (`exit code 0`).

This is independent of tmux version and config. See matrix below.

### What this is NOT
Not the unfocused-pane keystroke bug (#4213): output is delivered fine and this is not about input/enter. This is specifically **completion/exit detection** of shell tool commands.

### Reproduction matrix
| Condition | Result |
|---|---|
| Inside tmux 2.7 | hangs -> "still running" forever |
| Inside tmux 3.3a (`escape-time 0`, `allow-passthrough on`) | hangs |
| Outside tmux | `echo hello` -> completes, exit 0 |

### Affected version

1.0.74-1 (also seen on prior versions starting from 1.0.70). Version 1.0.69 is unaffected

### Steps to reproduce the behavior

1. Start Copilot CLI **inside a tmux pane**.
2. Have the agent run a shell command, e.g. `echo hello`.
3. Output `hello` appears, but the command is reported "still running" indefinitely; only `stop` clears it.
4. Exit tmux, repeat the same command. It completes normally with exit code 0.

### Expected behavior

Shell command completion/exit should be detected the same inside and outside tmux.

### Additional context

### Environment
- Copilot CLI: **1.0.74-1** (also seen on prior version)
- OS: Linux
- Shell: /bin/bash, `TERM=xterm-256color`
- tmux: reproduced on **2.7** and **3.3a**

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện sự cố bên trong và bên ngoài tmux với `echo hello`, đồng thời so sánh việc hoàn tất lệnh shell và trạng thái thoát. Theo dõi cơ chế CLI phát hiện lệnh shell hoàn tất và xác định tại sao tmux lại khác; được xem là hoàn tất khi lệnh báo đã hoàn tất và mã thoát là 0 trong cả hai môi trường.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
bash, shell
Lĩnh vực
cli, operating-systems
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.