/restart fails when the CLI was launched with --new-session-id
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/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ệ
- cli, javascript
- Lĩnh vực
- cli
Hướng nghiên cứu
argv khởi động lại được tạo trong cli-main.js (1.0.98): tìm hàm hỗ trợ strip loại bỏ --session-id, --resume và các cờ liên quan khỏi process.argv.slice(2). Thêm --new-session-id và --new-session-id= vào danh sách đó, và với dạng không có dấu = thì tiêu thụ giá trị theo sau. Kiểm chứng bằng cách khởi chạy với --new-session-id <uuid> rồi chạy /restart; argv được dựng lại chỉ nên chứa một cờ phiên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
Launching the CLI with --new-session-id <uuid> and then running /restart fails every time:
error: the argument '--new-session-id <id>' cannot be used with '--session-id <id>'
Usage: copilot --log-dir <directory> --plugin-dir <directory> --add-dir <directory> --additional-mcp-config <json> --yolo
For more information, try '--help'.
By the time this surfaces the foreground session has already been shut down, so the restart is not recoverable.
Repro
copilot --new-session-id 11111111-2222-4333-8444-555555555555(any fresh UUID)- Run
/restart
This matters for embedding hosts, which pass --new-session-id on every session launch, so /restart is permanently unusable there rather than occasionally.
Cause
/restart rebuilds the child argv from process.argv.slice(2), strips the session-selection flags, then appends --session-id <current session id>.
In cli-main.js (1.0.98) the strip helper removes -r, --resume, --resume=, --session-id, --session-id=, --continue, --cloud, -i, --interactive, --interactive=, --experimental, --no-experimental, --fleet and -C. --new-session-id is absent from that list, so it survives into the restart argv next to the freshly appended --session-id, and the parser declares the two mutually exclusive.
The same rebuilt argv is persisted for the supervised restart path, so both the supervised and unsupervised paths fail identically.
Expected
The strip helper should drop --new-session-id and --new-session-id=<uuid>, consuming the following value in the bare form, exactly as it already does for --session-id. The session exists by restart time, so re-asserting a creation ID is both wrong and rejected.
Workaround
Patching the strip helper locally to treat --new-session-id like --session-id resolves it, but the file lives in the extracted package folder and the fix is lost on every CLI update.
Version
1.0.98 on Windows, win32-x64.
- Ngôn ngữ chính
- Shell
- Star
- 11.3k
- Fork
- 2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
area:input-keyboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
github/copilot-cli#5113 ·
-
area:sessions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4996 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
github/copilot-cli#4963 · 1 bình luận ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#4932 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#4909 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
Webcam overlay freezes during voxtype dictation while screen recording (pause_media pauses the overlay mpv)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
TYPO3BestPractices/tea#2409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
mattpocock/skills#1281 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pip_install() in notebook_utils.py drops version constraints on Windows because of shell=TrueCó thể đã có người làm @prajakta128 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
openvinotoolkit/openvino_notebooks#3748 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
github_actions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
hiero-ledger/hiero-consensus-node#27621 ·
Maintainer thường phản hồi trong vòng 1 ngày