continuedev/continue · error · Error
Greptile token not found.
Error message
Greptile token not found.
What it means
GreptileContextProvider.getContextItems throws immediately when no Greptile API token is resolvable. The token comes from provider options (GreptileToken) or the GREPTILE_AUTH_TOKEN environment variable; if both are absent the provider refuses to run.
Source
Thrown at core/context/providers/GreptileContextProvider.ts:30
class GreptileContextProvider extends BaseContextProvider {
static description: ContextProviderDescription = {
title: "greptile",
displayTitle: "Greptile",
description: "Insert query to Greptile",
type: "query",
};
get deprecationMessage() {
return "The Greptile context provider is now deprecated and will be removed in a later version. Please consider viewing their docs at greptile.com/docs/code-review-bot/auto-resolve-with-mcp for resolving greptile queries.";
}
async getContextItems(
query: string,
extras: ContextProviderExtras,
): Promise<ContextItem[]> {
const greptileToken = this.getGreptileToken();
if (!greptileToken) {
throw new Error("Greptile token not found.");
}
const githubToken = this.getGithubToken();
if (!githubToken) {
throw new Error("GitHub token not found.");
}
let absPath = await this.getWorkspaceDir(extras);
if (!absPath) {
throw new Error("Failed to determine the workspace directory.");
}
var remoteUrl = getRemoteUrl(absPath);
remoteUrl = getRemoteUrl(absPath);
const repoName = extractRepoName(remoteUrl);
const branch = getCurrentBranch(absPath);
const remoteType = getRemoteType(remoteUrl);
View on GitHub (pinned to 5522c6f44c)
Solutions
- Set GREPTILE_AUTH_TOKEN in the environment where the IDE/extension launches
- Or pass GreptileToken in the provider's options in config.yaml
- Restart the IDE after setting the env var so the backend picks it up
Example fix
// config.yaml
# before
name: greptile
params: {}
# after
name: greptile
params:
GreptileToken: gtp_xxx
Defensive patterns
Strategy: validation
Validate before calling
const token = params.GreptileToken ?? process.env.GREPTILE_AUTH_TOKEN;
if (!token) {
// skip provider instead of letting it throw
disableProvider('greptile');
} Try / catch
catch (e) { if (/Greptile token/.test(e.message)) promptForToken('GREPTILE_AUTH_TOKEN'); } Prevention
- Set required tokens via env before launching the IDE
- Add a config lint step that checks provider params against required option lists
When it happens
Trigger: Invoking the greptile context provider without a GreptileToken option and without GREPTILE_AUTH_TOKEN in the environment of the Continue process.
Common situations: User added the greptile provider to config.yaml but never set the token; token was set in a shell that isn't the parent of the IDE; option key typo (GreptileToken).
Understand the failure class
Background: "API key is required" / "API key not found" / "No API key was set": the missing-api-key error family across 16 libraries — this error's family across 16 libraries.
Related errors
- GitHub token not found.
- Failed to determine the workspace directory.
- Unable to determine remote type.
- HTTP error! status: ${response.status}
- Failed to parse Greptile response: ${rawText}
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/0ca5647f66777bcb.
Report an issue: GitHub.