Problem
thv llm setup fails on every Windows machine when a direct-mode tool (Claude Code) or Claude Desktop is detected:
Error: executable path "C:\Users\crux\AppData\Local\Microsoft\WinGet\Packages\stacklok.thv_Microsoft.Winget.Source_8wekyb3d8bbwe\thv.exe" contains shell-unsafe characters; move thv to a path without quotes, backslashes, semicolons, dollar signs, or backticks (Windows paths are not supported by thv llm setup)
Reported by a user who installed via WinGet.
Cause
buildTokenHelperCommand in pkg/llm/setup.go interpolates os.Executable() into a shell command string ("<path>" llm token) that is written into Claude Code's apiKeyHelper. Because that string is later re-executed by a shell, the function rejects paths containing shell metacharacters — including \.
Backslash is the Windows path separator, so no Windows path can pass. WinGet is incidental: C:\thv.exe fails identically. The remediation the error suggests ("move thv to a path without backslashes") is impossible to follow on Windows.
Two things make it worse than a single-tool failure:
- The check runs before login and before any file is patched, so setup aborts entirely.
- It is gated on whether any detected tool needs the shell helper, so an installed Claude Code fails the whole run — including proxy-mode tools like Cursor that never use the string.
Impact
thv llm setup is unusable on Windows for Claude Code and Claude Desktop. Codex is unaffected (it uses an argv table with no shell). Proxy-mode tools are only affected via the shared-abort behaviour above.
Workaround
Configure Claude Code by hand — thv llm config set has no such restriction, then add apiKeyHelper / ANTHROPIC_BASE_URL / CLAUDE_CODE_API_KEY_HELPER_TTL_MS to %USERPROFILE%\.claude\settings.json manually, using a bare thv llm token rather than an absolute path.
Note
Claude Desktop is separately blocked on Windows (its credential-helper shim is a POSIX /bin/sh script) and needs its own fix.
Problem
thv llm setupfails on every Windows machine when a direct-mode tool (Claude Code) or Claude Desktop is detected:Reported by a user who installed via WinGet.
Cause
buildTokenHelperCommandinpkg/llm/setup.gointerpolatesos.Executable()into a shell command string ("<path>" llm token) that is written into Claude Code'sapiKeyHelper. Because that string is later re-executed by a shell, the function rejects paths containing shell metacharacters — including\.Backslash is the Windows path separator, so no Windows path can pass. WinGet is incidental:
C:\thv.exefails identically. The remediation the error suggests ("move thv to a path without backslashes") is impossible to follow on Windows.Two things make it worse than a single-tool failure:
Impact
thv llm setupis unusable on Windows for Claude Code and Claude Desktop. Codex is unaffected (it uses an argv table with no shell). Proxy-mode tools are only affected via the shared-abort behaviour above.Workaround
Configure Claude Code by hand —
thv llm config sethas no such restriction, then addapiKeyHelper/ANTHROPIC_BASE_URL/CLAUDE_CODE_API_KEY_HELPER_TTL_MSto%USERPROFILE%\.claude\settings.jsonmanually, using a barethv llm tokenrather than an absolute path.Note
Claude Desktop is separately blocked on Windows (its credential-helper shim is a POSIX
/bin/shscript) and needs its own fix.