github / github/copilot-cli

Interactive startup hangs indefinitely (no timeout) when Copilot backend is slow/unreachable

Đang mở
#3,990 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:authentication area:networking
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ả

**Version:** copilot v1.0.65 (Node SEA, Linux x64)
**OS / shell:** Linux (Ubuntu), bash; installed via gh.io/copilot-install

**Description**
When the Copilot backend endpoints (api.github.com/copilot_internal/user, api.business.githubcopilot.com) are intermittently slow or timing out, `copilot --interactive ""` hangs indefinitely at startup — spinner never resolves, the TUI never becomes usable, and there is no timeout, retry, or error. The process must be killed manually. Non-interactive prompt mode (`copilot -p`) and sessions that don't auto-send a first message do not exhibit this.

Copilot Business via org/enterprise; reproduced across multiple users on the same host; happy to share sanitized logs.

**Steps to reproduce**

1. Induce latency/timeouts on the Copilot API endpoints (e.g., firewall delay/drop on api.business.githubcopilot.com and api.github.com/copilot_internal/*). Core api.github.com remains fast.
2. Run copilot --interactive "hello".
3. Observe: startup reaches "Memory enablement check: enabled" then stalls before "Sending request to the AI model" and hangs forever.

**Expected**
A bounded timeout with a clear error and/or retry on the startup auth/account bootstrap, so the client fails fast or degrades to a usable prompt —rather than hanging indefinitely.

**Actual**
Infinite hang. Diagnostics show the Node event loop is idle (process._getActiveRequests() empty; only stdio + 1 FSWatcher handles); the outboundsockets are owned by the native runtime. First error in logs:

```
[rust:runtime::auth_manager_orchestration] Failed to fetch OAuth user login:
network fetch failed ... api.github.com/copilot_internal/user (10s timeout)
```

i.e., the JS layer awaits a native-runtime promise that never resolves when the backend bootstrap call stalls.

**Impact**
On hosts with intermittent latency to the Copilot API paths, interactive launches hang with no recovery. A startup timeout/retry would make theclient resilient.

**Additional context**
Reproduced across multiple accounts; correlated with backend latency spikes (1.5–30s+) on the Copilot API hostnames while core GitHub API stayedfast (<0.1s). Prompt mode (-p) is a reliable workaround.

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

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

Hướng nghiên cứu

Start by reproducing the hang with copilot --interactive "hello" while delaying the Copilot API paths, then trace the startup authentication flow and the Rust auth_manager_orchestration error described in the issue. Done means a stalled bootstrap reaches a bounded timeout with a clear error, retry, or usable prompt instead of waiting indefinitely.

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, linux, node.js, rust
Lĩnh vực
authentication, cli, networking
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
50/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.