docs

Set up with GitHub Copilot

Give the GitHub Copilot cloud agent read access to Unhandled with an agent identity, and hand an issue to Copilot from the issue page.

The Copilot cloud agent runs on GitHub, so it cannot sign in through a browser. It reads Unhandled with an agent identity token instead.

  1. Create an agent identity

    An organization admin opens Settings > MCP > Agent identities, then New identity. Pick read scopes, an expiry of at most 90 days and, if you can, the IP addresses GitHub's agent runs from. The token starts with unh_agent_ and is shown once.

  2. Store the token as an Agents secret

    In the repository or organization settings, add an Agents secret named COPILOT_MCP_UNHANDLED_TOKEN. Copilot only passes secrets whose names start with COPILOT_MCP_.

  3. Add the server

    Under Settings > Copilot > MCP servers, add:

    json
    {
      "mcpServers": {
        "unhandled": {
          "type": "http",
          "url": "https://unhandled.net/mcp/x/debug",
          "headers": { "Authorization": "Bearer $COPILOT_MCP_UNHANDLED_TOKEN" },
          "tools": ["get_fix_context", "get_issue", "list_issues", "get_trace", "search_logs"]
        }
      }
    }

    Keep tools to read tools.

Hand an issue to Copilot

Fix with your agent on the issue page has a Copilot cloud agent target. GitHub only lets a person assign Copilot, so it sends you to GitHub to authorize the Unhandled app, then back to the issue. Unhandled uses that authorization once, to assign copilot-swe-agent[bot] with instructions to call get_fix_context, and does not keep it.

  • Copilot must be enabled for the repository, and your GitHub account must be able to assign it.
  • The target needs the GitHub integration and a repository linked to the project.
  • It is web-only. handoff_issue cannot assign Copilot, because an agent has no GitHub account to authorize with.
  • A server that hosts its own Unhandled turns it on with GITHUB_COPILOT_HANDOFF.

Without the identity above, Copilot cannot read the issue's context. Fix issues covers the other hand-off targets.

Next