github / github/copilot-cli

Add a method to /exit from Copilot CLI regardless of nested sessions

Open
#4,874 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the feature or problem you'd like to solve

Add a method to /exit from Copilot CLI regardless of nested sessions

Proposed solution

Add a /exit behavior that gracefully terminates the current Copilot CLI, either by changing the /exit behavior, adding a subcommand or adding a separate command.

Example prompts or workflows

N/A

Additional context

When using a Copilot CLI session, and running several /new sessions after completing unrelated work, invoking the /exit command will currently exit the current session and show the previous one - instead of existing Copilot CLI.

This matches behavior matches with the current docs:

/exit, /quit: Close the current session. If other sessions are running, this foregrounds the newest remaining one instead of quitting. Quits the CLI only when it is the last open session. /exit print always tears down the CLI and offers to dump the transcript.

To fully close Copilot CLI after multiple /new turns on either has to run /exit multiple times or terminate the process.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing /exit command and the session handling used after multiple /new sessions. Reproduce the documented behavior with nested sessions, then verify that the chosen /exit behavior closes the entire Copilot CLI while preserving the existing current-session behavior where appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.