Skip to content

Desktop app (Windows): enabling remote control fails with "Failed to set up remote session" — log shows "No authentication token available; remote export disabled" #4954

Description

@sukrithanda

Describe the bug

In the GitHub Copilot desktop app on Windows, remote control can't be turned on for a session. Every attempt fails with:

Remote control unavailable

Failed to update remote control: RPC error -32603: Request session.remote.enable failed with message: Failed to set up remote session. Ensure the working directory is a GitHub repository and you are authenticated.

The working directory is a GitHub repository and the app is signed in. The runtime log shows the same warning at startup and on each enable attempt:

[WARNING] [rust:remote::shared_api] No authentication token available; remote export disabled

The app has a working GitHub token in other contexts. Inside the session, gh auth status succeeds (logged in via GH_TOKEN, scopes include repo, workflow, read:org), and the GitHub MCP server connects without problems. The remote module seems to be the only part that can't get a token.

Affected version

Desktop app runtime version 1.0.87-0. The standalone copilot CLI is not installed on this machine.

Steps to reproduce the behavior

  1. Open a worktree session in the desktop app for a GitHub-hosted repo (origin is https://github.com/<owner>/<repo>.git).
  2. Try to turn on remote control for the session, to manage it from GitHub Mobile.
  3. The "Remote control unavailable" error above appears.
  4. ~\.copilot\logs\process-*.log shows No authentication token available; remote export disabled at the time of the attempt.

Things that did not help:

  • Restarting the app
  • Signing out and back in to the app
  • Pushing the session branch to origin and setting upstream tracking

Expected behavior

Remote control turns on and the session can be managed from GitHub Mobile, using the app's existing GitHub sign-in.

Additional context

Activity

  1. Nazgugu commented on Sep 25, 2026

    @Nazgugu

    Root cause found, with a minimal reproduction. This also happens on macOS, not only Windows.

    Environment: GitHub Copilot app 1.1.23 (macOS arm64) with its bundled CLI 1.0.87-0. Also reproduced with the standalone CLI builds 1.0.88 and 1.0.89-3.

    Summary: session.remote.enable fails for a session whose working directory is a GitHub repository whenever the session has a session-level GitHub credential (gitHubTokenProvider, or a session gitHubToken). The desktop app authenticates its sessions with a per-session token provider (its process logs reference GitHub token provider registration "<uuid>"), so remote control can never be enabled for repository-backed project sessions. General chats can still be exported read-only because their working directory is not a repository, and that path does use the session credential.

    Reproduction, using the SDK bundled in the app (/Applications/GitHub Copilot.app/Contents/Resources/copilot-sdk) and the app's own CLI binary, with GH_TOKEN set in the environment:

    import { CopilotClient, RuntimeConnection } from "/Applications/GitHub Copilot.app/Contents/Resources/copilot-sdk/index.js";
    
    const client = new CopilotClient({
      connection: RuntimeConnection.forStdio({
        path: `${process.env.HOME}/Library/Caches/github-copilot-sdk/cli/1.0.87-0/copilot`,
        args: ["--no-auto-update", "--log-level", "debug"],
      }),
    });
    await client.start();
    const session = await client.createSession({
      workingDirectory: process.argv[2], // a clone of any GitHub repository
      onPermissionRequest: () => ({ kind: "reject" }),
      // Remove this callback and remote.enable succeeds:
      gitHubTokenProvider: () => ({ kind: "token", accessToken: process.env.GH_TOKEN, tokenType: "bearer", expiresIn: 28800 }),
    });
    try {
      console.log(await session.rpc.remote.enable({ mode: "export" }));
    } catch (e) {
      console.log("remote.enable failed:", e.message);
    }
    await session.disconnect();
    await client.stop();
    Session credential Working directory remote.enable
    none (process-level GH_TOKEN only) GitHub repository ✅ https://github.com/<owner>/<repo>/tasks/<id>
    gitHubTokenProvider GitHub repository ❌ Failed to set up remote session. Ensure the working directory is a GitHub repository and you are authenticated.
    session gitHubToken GitHub repository ❌ same error
    gitHubTokenProvider not a repository ✅ read-only, https://github.com/copilot/tasks/<id>

    The remote URL form makes no difference: https://github.com/..., ssh://git@github.com/... and git@github.com:... fail the same way. Everything else (binary, environment, process working directory, account, repository) was identical between the passing and failing runs.

    Log evidence (--log-level debug). The passing and failing runs differ only in these lines:

    - [DEBUG] Set auth info on session <id>
    + [DEBUG] Set auth context on session <id>
    + [WARNING] [rust:remote::shared_api] No authentication token available; remote export disabled

    The provider callback is invoked once, at session creation (reason: "initial", host: "https://github.com"), and is not called again during remote.enable. In the CLI's app.js, the session.create handler calls authManager.applySessionAuthContext(...) when the session has a credential registration and applySessionCredentials(...) otherwise. The native remote exporter's repository path appears to read only the credential set by the latter, so it finds no token. The non-repository path does use the session's credential.

    Signing in to the standalone CLI (copilot login), restarting the app, and pushing or re-tracking the branch do not help, because the failing lookup never consults those credentials.

  2. copilot-cli-bot commented on Oct 6, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.92. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions