github/copilot-sdk · error
No GitHub token provider registered for registration ID
Error message
No GitHub token provider registered for registration ID "${params.registrationId}" What it means
Token-acquisition callback dispatch failure: the runtime sent a gitHubToken/getToken request referencing a registrationId that the client has no registered provider for. The githubTokenProviders map lookup for that registration ID returned undefined, meaning the provider was never registered or was registered under a different ID.
Solutions
- Register a token provider for that exact registrationId via the client's GitHub token provider registration API before the session requests it
- Check for typos or casing mismatches between the registrationId used at registration time and the one the runtime sends
- If the provider was unregistered during shutdown, ensure sessions using it are closed first
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at nodejs/src/client.ts:867 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of github/copilot-sdk@cd8cf15dc3 (2026-09-09).
Data as JSON: /api/errors/9134b6e17d3cfa1b.
Report an issue: GitHub.
Appendix: source
Thrown at nodejs/src/client.ts:867
await onGitHubTelemetry(notification);
} catch {
// Ignore handler errors
}
},
};
}
handlers.gitHubToken = {
getToken: (params) => this.acquireGitHubToken(params),
};
this.clientGlobalHandlers = handlers;
}
private async acquireGitHubToken(
params: GitHubTokenAcquireRequest
): Promise<GitHubTokenAcquireResult> {
const registration = this.githubTokenProviders.get(params.registrationId);
if (!registration) {
throw new Error(
`No GitHub token provider registered for registration ID "${params.registrationId}"`
);
}
return await registration.provider({
host: params.host,
sessionId: params.sessionId ?? registration.sessionId,
reason: params.reason,
});
}
private registerGitHubTokenProvider(
provider: GitHubTokenProvider | undefined,
sessionId?: string
): string | undefined {
if (!provider) {
return undefined;
}
const registrationId = randomUUID();View on GitHub (pinned to cd8cf15dc3)