diff --git a/packages/coding-agent/test/discovery/claude-commands.test.ts b/packages/coding-agent/test/discovery/claude-commands.test.ts index 30774cf15..461c7ac8d 100644 --- a/packages/coding-agent/test/discovery/claude-commands.test.ts +++ b/packages/coding-agent/test/discovery/claude-commands.test.ts @@ -25,6 +25,7 @@ describe("Claude Code slash command discovery", () => { resetSettingsForTest(); originalHome = process.env.HOME; originalClaudeConfigDir = process.env.CLAUDE_CONFIG_DIR; + delete process.env.CLAUDE_CONFIG_DIR; root = await fs.mkdtemp(path.join(os.tmpdir(), "omp-claude-commands-")); home = path.join(root, "home"); project = path.join(root, "project"); diff --git a/packages/coding-agent/test/discovery/claude-plugins.test.ts b/packages/coding-agent/test/discovery/claude-plugins.test.ts index f7ab94501..aa28719dd 100644 --- a/packages/coding-agent/test/discovery/claude-plugins.test.ts +++ b/packages/coding-agent/test/discovery/claude-plugins.test.ts @@ -86,6 +86,7 @@ describe("listClaudePluginRoots", () => { originalOmpProfileEnv = process.env.OMP_PROFILE; originalPiProfileEnv = process.env.PI_PROFILE; originalClaudeConfigDir = process.env.CLAUDE_CONFIG_DIR; + delete process.env.CLAUDE_CONFIG_DIR; tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "claude-plugins-test-")); testAgentDir = await fs.mkdtemp(path.join(os.tmpdir(), "claude-plugins-test-agent-")); process.env.HOME = tempDir; @@ -1378,15 +1379,19 @@ describe("listClaudePluginRoots", () => { describe("discoverAgents plugin precedence", () => { let tempDir: string; + let originalClaudeConfigDir: string | undefined; beforeEach(async () => { clearClaudePluginRootsCache(); clearFsCache(); + originalClaudeConfigDir = process.env.CLAUDE_CONFIG_DIR; + delete process.env.CLAUDE_CONFIG_DIR; tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "claude-plugins-precedence-test-")); }); afterEach(async () => { clearClaudePluginRootsCache(); + restoreEnvValue("CLAUDE_CONFIG_DIR", originalClaudeConfigDir); await removeWithRetries(tempDir); }); diff --git a/packages/coding-agent/test/foreign-session-stores.test.ts b/packages/coding-agent/test/foreign-session-stores.test.ts index 4b92d066c..e3af3e875 100644 --- a/packages/coding-agent/test/foreign-session-stores.test.ts +++ b/packages/coding-agent/test/foreign-session-stores.test.ts @@ -17,6 +17,7 @@ let originalClaudeConfigDir: string | undefined; beforeEach(async () => { tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "omp-foreign-sessions-")); originalClaudeConfigDir = process.env.CLAUDE_CONFIG_DIR; + delete process.env.CLAUDE_CONFIG_DIR; }); afterEach(async () => {