{"record":{"id":"424db4e02562f1bb","repo":"continuedev/continue","slug":"no-workspace-directories-found-make-sure-you-ve-o","errorCode":null,"errorMessage":"No workspace directories found. Make sure you've opened a folder in your IDE.","messagePattern":"No workspace directories found\\. Make sure you've opened a folder in your IDE\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"core/config/createNewAssistantFile.ts","lineNumber":48,"sourceCode":"    roles:\n      - chat\n      - edit\n      - apply\n    defaultCompletionOptions:\n      contextLength: 200000\n      maxTokens: 64000\n    capabilities:\n      - tool_use\n      - image_input\n`;\n\nexport async function createNewAssistantFile(\n  ide: IDE,\n  assistantPath: string | undefined,\n): Promise<void> {\n  const workspaceDirs = await ide.getWorkspaceDirs();\n  if (workspaceDirs.length === 0) {\n    throw new Error(\n      \"No workspace directories found. Make sure you've opened a folder in your IDE.\",\n    );\n  }\n\n  const baseDirUri = joinPathsToUri(\n    workspaceDirs[0],\n    assistantPath ?? \".continue/agents\",\n  );\n\n  // Find the first available filename\n  let counter = 0;\n  let assistantFileUri: string;\n  do {\n    const suffix = counter === 0 ? \"\" : `-${counter}`;\n    assistantFileUri = joinPathsToUri(baseDirUri, `new-config${suffix}.yaml`);\n    counter++;\n  } while (await ide.fileExists(assistantFileUri));\n","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/config/createNewAssistantFile.ts#L30-L66","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)"],"exampleFix":"// before\nconst api = new VertexAIApi({ project: 'p', region: 'us-central1' }); // relies on ADC\n\n// after\nconst api = new VertexAIApi({\n  project: 'p', region: 'us-central1',\n  keyJson: fs.readFileSync('/secrets/sa.json', 'utf8'),\n});","handlingStrategy":"fallback","validationCode":"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; } }","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["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"],"tags":["vertexai","authentication","google-adc","oauth"],"backgroundTag":"google-application-default-credentials-missing","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}