github / github/copilot-cli

--cloud owner picker hangs, reconnect crashes, and task polling reaches 429

未关闭
#4,568 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:networking area:sessions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Describe the bug

copilot --cloud fails through several connected symptoms:

  1. Without repository context, the CLI hangs indefinitely at Loading available owners....
  2. With repository context, the cloud task is created but remains at session.requested until provisioning times out.
  3. Reconnecting with copilot --connect=<task-id> opens a blank terminal pane.
  4. The reconnect process polls rapidly enough to receive HTTP 429 responses.
Affected version

GitHub Copilot CLI 1.0.81-7 prerelease on Windows 11 with PowerShell 7 and Windows Terminal.

Steps to reproduce the behavior
  1. Authenticate through GitHub CLI with a valid token containing read:org.

  2. Run:

    copilot --cloud
    
  3. Observe the owner picker hanging at Loading available owners....

  4. Run from a repository:

    copilot -C C:\path\to\repository --cloud
    
  5. Observe the task being created, followed by:

    Timed out waiting for the remote sandbox to start.
    
  6. Reconnect:

    copilot --connect=<task-id>
    
  7. Observe a blank terminal pane.

Relevant sanitized log sequence

Owner discovery:

Welcome <user> (via gh)!
listOwnerOptions: failed to fetch owners: AbortError: This operation was aborted

Authentication:

gh auth token exited non-zero
stderr: no oauth token found for https://github.com
CLI auth notification has no usable server token

The equivalent command succeeds when given a hostname:

gh auth token --hostname github.com

It fails when given the full URL:

gh auth token --hostname https://github.com

The runtime configuration contains:

{
  "githubHost": "https://github.com"
}

Cloud task:

listed Mission Control task events
event_count=1
first_event_types=["session.requested"]

This remained unchanged for the entire provisioning period.

Reconnect:

switchSession failed: Error: Session has no GitHub auth service configured
TerminalRenderer React uncaught error:
Error: Session has no GitHub auth service configured

Polling then repeatedly failed with:

status=429
body_preview="too many requests"
Bundled implementation comparison

In 1.0.80, owner discovery directly fetches /user and /user/orgs using the session token.

In 1.0.81-7, it uses the native githubListOwnerOptions request and cancellation path. The request is aborted during the authentication-state transition.

This suggests a regression in the native owner-discovery/auth integration.

Expected behavior
  • Normalize https://github.com to github.com before invoking gh auth token.
  • Do not cancel owner discovery because an equivalent authentication object is refreshed.
  • Do not switch the renderer to a remote session lacking its GitHub auth service.
  • Surface reconnect failures instead of leaving a blank pane.
  • Back off task polling and respect HTTP 429 responses.
Additional context

The repository was private, the authenticated user had admin access, and the token contained read:org.

Environment: Windows 11, x86_64, PowerShell 7, Windows Terminal.

No matching public issue was found. Raw logs are intentionally not attached because debug logging includes environment data.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,在 GitHub Copilot CLI 1.0.81-7 上复现列出的 PowerShell 命令,并将 owner 发现与 1.0.80 进行比较。跟踪认证转换、reconnect session 设置以及围绕记录到的 AbortError、缺失的 auth service 和 HTTP 429 响应的 task polling。完成的标准是 owner 加载完成、provisioning 取得进展、reconnect 被渲染或报告错误,并且 polling 在遇到速率限制时执行退避。

由索引模型根据 Issue 内容生成。

评估

技术栈
github, shell
领域
authentication, cli, cloud
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。