Desktop-app sessions die a few minutes after spawn

Open
#4,048 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
github, macos

Research direction

Start by reproducing the failure using the listed worktree-session steps and inspect the process logs for copilot_runtime::session::mcp::tool_catalog and remote::api_session_exporter. Trace how the GitHub credential registration is used by github-mcp-server after spawn and how a stale catalog affects later turns. Done means the credential failure no longer terminates the app-hosted session or makes subsequent turns unusable.

Written by the indexing model from the issue text.

Description

Title: Desktop-app sessions die a few minutes after spawn: "GitHub credential registration is no longer available for this session" → stale github-mcp-server catalog treated as fatal

Environment

  • GitHub Copilot desktop app 1.1.22 (commit c3daa01), macOS (arm64), bundled CLI 1.0.84-5

  • Account: TwoPatient (github.com); gh auth status reports valid tokens (GH_TOKEN and keyring)

  • Standalone CLI 1.0.86 (/opt/homebrew/bin/copilot) is not affected

Summary

In app-hosted sessions, the GitHub credential registration the CLI server uses for the built-in github-mcp-server (dynamic header provider) disappears a few minutes after the process spawns. github-mcp-server initialises fine at warm-up, but the first call to any of its tools (web_search, github-mcp-server-*) fails with a header-provider error, the MCP tool catalog is marked stale, and every subsequent model turn fails until the session ends with sessionEnd reason: error. Background sub-agents in the same process die too. App restarts (3×) did not help.

Steps to reproduce

  1. Create a new worktree session in the app; wait ~2–3 minutes.

  2. Ask the agent to call web_search (or any github-mcp-server-* tool).

  3. Observe the tool error, then repeated session errors on the next turns, then the session terminates.

Actual

Tool result:

Plain text

MCP tool catalog changed before tool "github-mcp-server-web_search" could be invoked: Failed to verify cached MCP tools: MCP request failed: Transport send error: unexpected server response: dynamic header provider failed: GitHub credential registration is no longer available for this session

Followed by 5 × session.error:

Plain text

Execution failed: Failed to refresh MCP tools for server github-mcp-server; the last catalog is stale

then session.end reason: error — CLI process exits, worktree session unusable.

Process log (copilot_runtime::session::mcp::tool_catalog): 30+ Failed to list MCP tools for github-mcp-server; continuing with the previously listed tools: … GitHub credential registration is no longer available for this session. Processes that never call github-mcp tools show the same root symptom non-fatally in remote::api_session_exporter: remote session batch flush failed {"error":"GitHub credential authority error: GitHub token provider registration \"<uuid>\" is unavailable"} from ~2 s after spawn.


Field Value
App version 1.1.22
OS macOS 27.0.0
Theme GitHub
Path /chat
Tenure Week 19
Dominant language
No language data
Stars
2.1k
Forks
157
PR merge metrics
No merged PRs in 30d

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.

More from github/app

All issues in github/app

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.