continuedev/continue · critical · Error
No workspace directories found. Make sure you've opened a fo
Error message
No workspace directories found. Make sure you've opened a folder in your IDE.
What it means
Thrown when the OAuth token request returns no token, meaning Google Application Default Credentials or the service-account flow could not authenticate. The adapter awaits clientPromise -> getAccessToken() and requires result.token before building the Authorization header.
Source
Thrown at core/config/createNewAssistantFile.ts:48
roles:
- chat
- edit
- apply
defaultCompletionOptions:
contextLength: 200000
maxTokens: 64000
capabilities:
- tool_use
- image_input
`;
export async function createNewAssistantFile(
ide: IDE,
assistantPath: string | undefined,
): Promise<void> {
const workspaceDirs = await ide.getWorkspaceDirs();
if (workspaceDirs.length === 0) {
throw new Error(
"No workspace directories found. Make sure you've opened a folder in your IDE.",
);
}
const baseDirUri = joinPathsToUri(
workspaceDirs[0],
assistantPath ?? ".continue/agents",
);
// Find the first available filename
let counter = 0;
let assistantFileUri: string;
do {
const suffix = counter === 0 ? "" : `-${counter}`;
assistantFileUri = joinPathsToUri(baseDirUri, `new-config${suffix}.yaml`);
counter++;
} while (await ide.fileExists(assistantFileUri));
View on GitHub (pinned to 5522c6f44c)
Solutions
- Run 'gcloud auth application-default login' or set GOOGLE_APPLICATION_CREDENTIALS to a valid key file
- Prefer explicit keyJson/keyFile in the adapter config over ambient ADC in containers
- Verify the service account still exists and the key is enabled; check system clock (NTP)
- If inside GCP, confirm the metadata server is reachable (no network egress block)
Example fix
// before
const api = new VertexAIApi({ project: 'p', region: 'us-central1' }); // relies on ADC
// after
const api = new VertexAIApi({
project: 'p', region: 'us-central1',
keyJson: fs.readFileSync('/secrets/sa.json', 'utf8'),
}); Defensive patterns
Strategy: fallback
Validate before calling
async function hasVertexAuth(): Promise<boolean> { try { const c = await new GoogleAuth({ scopes: 'https://www.googleapis.com/auth/cloud-platform' }).getClient(); return !!(await c.getAccessToken()).token; } catch { return false; } } Try / catch
try { await api.chatCompletionNonStream(body, signal); } catch (e) { if ((e as Error).message.includes('access token')) { /* fall back to explicit keyJson or alert on ADC config */ } throw e; } Prevention
- Set explicit keyJson/keyFile in containers instead of relying on ADC
- Run gcloud auth application-default login in dev; bake creds in CI
- Monitor token refresh failures in long-lived processes
When it happens
Trigger: No ADC configured and no keyJson/keyFile given (GoogleAuth falls back to ADC which finds nothing); service-account key revoked or deleted; scopes unreachable; system clock skew breaking JWT signing; metadata server unavailable on non-GCE environments.
Common situations: Code works locally (gcloud application-default login) but fails in Docker/CI where ADC was never set up; key rotated; GOOGLE_APPLICATION_CREDENTIALS pointing to a missing file path.
Related errors
- URL is not defined in params
- Response body is null
- VertexAI in express mode (apiKey only) cannot be configured
- region and projectId are required for VertexAI (when not usi
- VertexAI: keyJson must contain a valid private key
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/424db4e02562f1bb.
Report an issue: GitHub.