Describe the bug
A Copilot CLI session started with copilot -w cannot recover after running /restart inside the session. The restart attempts to use both the worktree option and the existing session ID, which results in an option conflict.
Affected version
1.0.80
Steps to reproduce the behavior
-
From any Git repository, start Copilot CLI with an automatically created worktree:
$ copilot -w
Created worktree at /path/to/repo.worktrees/<generated-name> (branch <generated-name>)
-
Inside the session, run /restart.
-
Observe the error:
error: option '-w, --worktree[=name]' cannot be used with option '--session-id <id>'
Expected behavior
/restart should restart or resume the current session successfully while retaining the existing worktree, without passing -w in conflict with --session-id.
Additional context
- Operating system: macOS
- Shell: zsh
- The session was started with the bare
-w option, allowing Copilot CLI to generate the worktree name.
Describe the bug
A Copilot CLI session started with
copilot -wcannot recover after running/restartinside the session. The restart attempts to use both the worktree option and the existing session ID, which results in an option conflict.Affected version
1.0.80Steps to reproduce the behavior
From any Git repository, start Copilot CLI with an automatically created worktree:
Inside the session, run
/restart.Observe the error:
Expected behavior
/restartshould restart or resume the current session successfully while retaining the existing worktree, without passing-win conflict with--session-id.Additional context
-woption, allowing Copilot CLI to generate the worktree name.