github / github/copilot-cli

[CLI] copilot --resume "Name With Spaces" fails silently with exit 1

オープン
#3,754 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
area:sessions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

## Summary
`copilot --resume ""` fails with exit code 1 and no output whenever `` contains spaces, even when the name is an exact, case-correct match for an existing session created via `--name`. Names without spaces (e.g. kebab-case) resolve correctly.

This contradicts the documented usage in `copilot --help`:

```
# Resume a session by name
$ copilot --resume="my feature"
```

That example cannot work today.

## Version
- Copilot CLI **1.0.61**
- Windows 11, PowerShell 7
- Launched via the `agency` wrapper (the standard Windows install)

## Reproduction

Resuming with the command copilot provides after `/exit`
Image

But with just `copilot --resume`:
Image

```powershell
# 1. Create a session with a spaced name
copilot --name "Spaced Name Session" -p "echo init" --allow-all-tools --no-ask-user
# exit 0, session created. workspace.yaml shows: name: Spaced Name Session

# 2. Resume by that exact name
copilot --resume "Spaced Name Session" -p "echo go" --allow-all-tools --no-ask-user
# Observed: exit 1, no stdout, no stderr.
```

Control (changes only one variable — removing the spaces):
```powershell
copilot --name "UnspacedSession" -p "echo init" --allow-all-tools --no-ask-user
copilot --resume "UnspacedSession" -p "echo go" --allow-all-tools --no-ask-user
# Observed: exit 0, session resumes correctly.
```

Both `--resume "Name"` and `--resume="Name"` forms fail identically for the spaced case. Failure also reproduces against a real long-running session whose `name` contains spaces.

## Expected
Either:
1. Spaced names resolve correctly (matching the documented example), OR
2. The CLI emits a clear error explaining the lookup failed and exits non-zero.

Current silent exit with no diagnostic output sends users down the wrong debugging path: shell quoting, terminal lock, session in-use, version skew. Each of those is a plausible suspect for an exit-1-with-no-output failure.

## Workarounds (none acceptable as a fix)
- `copilot --resume <7-char-id-prefix>` works but defeats the purpose of friendly names
- `copilot --resume` (interactive picker) works but requires UI interaction
- Rename to kebab-case works but loses readability

## Why this matters
The documented and expected workflow for users who name sessions with descriptive labels (the example in `--help` is literally `"my feature"`) is broken. Every user who follows the docs hits a wall. The silent failure mode multiplies the cost.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

`copilot --resume` のエントリポイントから開始し、PowerShell でスペースなしの対照ケースとともに、名前にスペースが含まれる文書化されたケースを再現します。名前の検索を追跡し、スペースを含む名前が正常に再開されるか、サイレントな exit 1 ではなく明確な診断が生成されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell, shell
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。