Skip to content

Add a command to change remote session sync scope #3164

@namra98

Description

@namra98

What would you like to be added?

Please add a CLI command or slash command for changing the Copilot CLI remote/session-sync scope for the current repository after the initial prompt has been answered.

Examples of possible UX:

copilot session sync --scope repository
copilot session sync --scope user
copilot remote --scope repository

or interactive equivalents:

/remote scope repository
/session sync repository

Why is this needed?

When enabling remote sessions in a GitHub repository, Copilot CLI prompts for a session sync policy/scope, such as user-level vs repository-level sync. If the user picks the wrong option, or later wants to switch a repo from user scope to repository/team scope, there does not appear to be a discoverable command to change it.

The current workaround is to manually edit ~/.copilot/config.json, find the matching sessionSync entry, and change something like:

{ "origin": "owner/repo", "level": "user" }

to:

{ "origin": "owner/repo", "level": "repository" }

or delete the entry to force the prompt to appear again.

That works, but it is hard to discover, easy to get wrong, and not ideal for users trying to enable repository-level remote sessions for their team.

Proposed behavior

A command should allow users to:

  1. Show the current sync scope for the current repo.
  2. Change the sync scope to user, repository, or whatever valid levels are supported.
  3. Optionally reset the saved choice so the prompt is shown again.

For example:

copilot session sync status
copilot session sync set repository
copilot session sync reset

Additional context

/remote currently toggles remote mode and shows status, but does not expose the saved sync scope. /session exposes session management, but current help does not show a way to change this policy/scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions