---
name: CLAUDE_ENV_FILE not sourced on Windows (Anthropic bug)
description: Root cause of empty $OWL/$LIVE in Bash tool calls on Windows — Claude Code intentionally skips env-file sourcing. Not a plugin/orphan bug.
type: project
originSessionId: d1375eec-f3f2-4ec5-baad-95fd83668f42
---
On Windows, Claude Code **intentionally** skips sourcing `CLAUDE_ENV_FILE` into Bash tool subprocesses. Plugin SessionStart hook runs correctly, env file is written with valid exports, but CC refuses to source it. Net effect: `$OWL`, `$LIVE`, and any other plugin-provided env vars are **always empty** in Bash tool calls on Windows — regardless of plugin health, cache orphan status, or `installed_plugins.json` SHA.

Tracked in [anthropics/claude-code#27987](https://github.com/anthropics/claude-code/issues/27987). Compiled-bundle analysis by `bsekiewicz` in that thread shows the early-return:

```js
if (E1() === "windows") return V("Session environment not yet supported on Windows"), null;
```

**Why:** Not a bug — a `return null` guard in `cn7` (the session env loader). Git Bash can source the file fine (I verified), but CC won't try.

**How to apply:**
- Stop blaming the plugin when `$OWL`/`$LIVE` are empty on Windows. The gen17/gen18 amendments in `~/.claude/spacetime/psyches/tracked/doyle.md` chased orphan/SHA theories for this, which are real but **downstream of** the unfixable-on-our-side Windows guard.
- Always-works workaround: absolute path `~/.claude/plugins/spt/owl.exe` (for owl subcommands) or `~/.claude/plugins/spt/owl.exe live ...` (for live subcommands). This is what gen17 settled on for the current session and it should be the default Windows path.
- Manual source also works: `source ~/.claude/session-env/<session_id>/sessionstart-hook-2.sh` inside a single Bash call restores exports for that call.
- The "structural fix" mentioned in gen18 amendment (trampoline self-orphan detection) would NOT resolve this — the env file would still never be sourced.
- Re-verify the upstream bug status periodically (issue was active as of Feb 2026; hasn't shipped fix yet as of Apr 2026).
