From 1e1bbe9729bae7fd84fb7c162c3be0bcc09a3687 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 03:14:46 +0000 Subject: [PATCH] fix(autonomy): use getWorkspaceDir() instead of hardcoded BASE_DATA_DIR path getConfigPath() was constructing the path as join(BASE_DATA_DIR || homedir(), '.vellum', 'workspace', 'autonomy.json') instead of using getWorkspaceDir(). This meant the config file was written to the wrong location in containerized mode where VELLUM_WORKSPACE_DIR is set to /workspace. Co-Authored-By: vargas@vellum.ai --- assistant/src/cli/commands/autonomy.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/assistant/src/cli/commands/autonomy.ts b/assistant/src/cli/commands/autonomy.ts index c9de55eb696..7d97eff360c 100644 --- a/assistant/src/cli/commands/autonomy.ts +++ b/assistant/src/cli/commands/autonomy.ts @@ -1,9 +1,9 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs"; -import { homedir } from "node:os"; import { dirname, join } from "node:path"; import type { Command } from "commander"; +import { getWorkspaceDir } from "../../util/platform.js"; import { log } from "../logger.js"; // --------------------------------------------------------------------------- @@ -33,8 +33,7 @@ const DEFAULT_AUTONOMY_CONFIG: AutonomyConfig = { // --------------------------------------------------------------------------- function getConfigPath(): string { - const root = join(process.env.BASE_DATA_DIR?.trim() || homedir(), ".vellum"); - return join(root, "workspace", "autonomy.json"); + return join(getWorkspaceDir(), "autonomy.json"); } function isValidTier(value: unknown): value is AutonomyTier { @@ -197,8 +196,7 @@ Resolution order (first match wins): 3. Channel default — per-channel tier set via --channel 4. Global default — the fallback tier set via --default -Config is stored in /.vellum/workspace/autonomy.json, where - is the BASE_DATA_DIR environment variable (defaults to $HOME). +Config is stored in /autonomy.json (resolved via getWorkspaceDir()). Examples: $ assistant autonomy get