diff options
| -rw-r--r-- | packages/opencode/src/env/index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/env/index.ts b/packages/opencode/src/env/index.ts index 8c40c08ed..003b59fc7 100644 --- a/packages/opencode/src/env/index.ts +++ b/packages/opencode/src/env/index.ts @@ -2,7 +2,9 @@ import { Instance } from "../project/instance" export namespace Env { const state = Instance.state(() => { - return process.env as Record<string, string | undefined> + // Create a shallow copy to isolate environment per instance + // Prevents parallel tests from interfering with each other's env vars + return { ...process.env } as Record<string, string | undefined> }) export function get(key: string) { |
