Subscription OAuth token not passed to plugin hook subprocesses on Windows — security-guidance LLM review silently disabled
Environment
- Claude Code 2.1.228, Windows 11 Pro (10.0.26200)
- Authenticated via
/login(Max subscription, no API key) - Plugin:
security-guidance2.0.7 (official marketplace), user scope
Observed
The security-guidance plugin's LLM review layers (turn-end diff review, commit-time review, push sweep) never run. ~/.claude/security/log.txt shows the hook firing on every prompt/stop event, but each review gate exits with:
Stop hook: LLM review disabled or no API credentials
(38 occurrences since install on 2026-08-14; zero successful LLM reviews.)
The hook gates on HAS_API_CREDENTIALS, which checks os.environ for ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN (hooks/llm.py). Neither variable is present in the environment that hook subprocesses (or Bash tool subprocesses) inherit on this machine. The plugin source explicitly expects the OAuth path to work — llm.py comments: "OAuth access token — Claude Code passes this for /login users" — and implements the subscriber-token system-prompt handshake. That "passes this" claim is contradicted here.
Expected
One of:
- Claude Code exports the OAuth token (as
ANTHROPIC_AUTH_TOKEN) to hook subprocess environments for/loginusers, as the plugin assumes; or - The docs (hooks, authentication, security-guidance) document that subscription credentials are not available to hooks and what the supported setup is; or
- The plugin surfaces the dormancy visibly (the README lists "subscription" as a working API path, and a user who installs it reasonably believes LLM review is active — a debug-log line is the only trace that it isn't).
Notes
CLAUDE_CODE_SUBPROCESS_ENV_SCRUBis not set on this machine, so this doesn't appear to be deliberate scrubbing.- Closest existing issue is #42603 (macOS Keychain token refresh from hooks), which implies hooks can see credentials on macOS — this report is about Windows, where the variable simply never appears.
- Happy to provide logs or run diagnostics.