Copilot app: user extensions never start in sessions linked to a pull request

Đang mở
#5,606 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, python
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

Start by tracing the app log’s extensions_reconciliation_needed decision for PR linked sessions, then compare it with the reconciliation path for sessions without a PR; the payload does not name source files or tests. Check how created_pr_number affects refresh behavior and add or locate coverage for both session types. Done when user extensions start in interactive sessions regardless of PR linkage.

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

Mô tả

area:plugins area:sessions
Describe the bug

In the GitHub Copilot app, user extensions in ~/.copilot/extensions/ never start in a session that has a pull request linked to it, either a PR the session created or a PR session. These sessions get none of the extensions' tools or hooks. Sessions without a linked PR load the same extension normally.

The app log suggests the app decides not to reconcile extensions for these sessions. Every extensibility live-session refresh completed line for a PR-linked session shows extensions_reconciliation_needed=false. Sessions without a PR show true. Both kinds show extensions_stale=true:

session_id=<PR-linked session, busy>  ... extensions_stale=true skills_stale=true extensions_reconciliation_needed=false
session_id=<PR-linked session>        ... extensions_stale=true skills_stale=true extensions_reconciliation_needed=false
session_id=<session without a PR>     ... extensions_stale=true skills_stale=true extensions_reconciliation_needed=true

I checked this on one machine across 4 app runs over 2 days. Every PR-linked session showed false and every session without a PR showed true. The one exception was a session without a PR that logged false once, about 10 seconds after it was created.

Affected version

GitHub Copilot app 1.5.0 (commit 6ff6e7f1), Windows x64. The CLI is 1.0.115 / 1.0.116.

Steps to reproduce the behavior
  1. Add a user extension that writes a heartbeat file when it starts. For example, ~/.copilot/extensions/probe/extension.mjs calls joinSession() and then writes <sessionId>.alive.json to a temp folder every 30 s.
  2. Restart the app.
  3. Open a session that has no linked PR and send a message. The heartbeat file for that session appears and keeps updating.
  4. Open a session whose workspace has a linked PR (created_pr_number is set, e.g. after the agent opened a PR) and send a message. The session runs normally, but no heartbeat file ever appears for it. The app log shows extensions_reconciliation_needed=false for that session ID.

Right now on my machine, 4 sessions without a PR have fresh heartbeats. Two PR-linked sessions that are busy at the same moment have none.

Expected behavior

User extensions start in every interactive session, whether or not a pull request is linked to it.

Additional context
  • This looks related to #5380, where extensions don't start for sessions created with create_session until the user switches to them. Here, though, the session is in the foreground and actively running, and the extension still never starts.
  • Use case: a desktop PR review tool hands a prompt (e.g. "resolve the merge conflicts on this PR") to the session that owns the PR through a small extension. PR-linked sessions are the most important case for this, and they are exactly the sessions where the extension never runs.
  • Related feature request: a supported way for an external tool to send a prompt into an existing session. Today ghapp://sessions/<id> only opens the session, and idle sessions shut down after about 10 minutes, so an extension is the only option.
Ngôn ngữ chính
Python
Star
11.5k
Fork
2k
Merge trung bình
6 giờ 34 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/copilot-cli

Tất cả issue của github/copilot-cli

Issue tương tự

Thêm issue về Python

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.