github / github/copilot-cli

bash tool fails inside devenv shell with bash 5.3 — "Invalid shell ID: 0 / no active shell sessions"

Đang mở
#2,850 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:platform-linux 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

The Copilot CLI bash tool silently fails when the shell session is using bash 5.3.x. Every bash call appears to succeed but no shellId is returned, and subsequent read_bash calls fail with:

Invalid shell ID: 0. Please supply a valid shell ID to read output from.

### Affected version

1.0.32 run within newest devenv from nixos-unstable

### Steps to reproduce the behavior

1. Install devenv (https://devenv.sh)
2.x (it pins bashInteractive from nixpkgs-unstable, currently 5.3.9)
2. Enter devenv shell
3. Launch copilot from within the devenv shell
4. Ask the agent to run any bash command (e.g. echo hello)
5. Agent reports no active shell sessions — bash tool is completely non-functional

### Expected behavior

_No response_

### Additional context

Works fine outside devenv (system bash 5.2.37). Also works in other AI coding tools (e.g. OpenCode) that don't rely on a persistent PTY session.

### Workaround

Shim bash in PATH to point to bash 5.2:
mkdir -p /tmp/bash-shim
ln -sfn /usr/bin/bash-5.2 /tmp/bash-shim/bash # adjust path for your system
export PATH="/tmp/bash-shim:$PATH"

Then launch copilot — bash tool works.
In short: looks like copilot have problem with newest bash Version: 5.3p9 from nixos-unstable.

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

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

Hướng nghiên cứu

Tái hiện công cụ bash bên trong một devenv shell bằng bash 5.3.9, sau đó so sánh với bash 5.2.37 và PATH shim được ghi lại; bắt đầu bằng cách theo dõi phiên PTY shell liên tục và việc xử lý shellId. Được xem là hoàn tất khi các lệnh gọi bash trả về shellId hợp lệ và read_bash lấy được đầu ra trong môi trường bị ảnh hưở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
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
48/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.