stacklok / stacklok/toolhive

`thv llm setup --client claude-desktop` fails on Windows (POSIX credential-helper shim)

Open
#6,507 3 comments 0 reactions 1 assignee View on GitHub

@stantheman0128 is already working on this.

Since Sep 4, 2026.

Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

Summary

On Windows 11, thv llm setup --client claude-desktop detects Claude Desktop, then fails:

Warning: failed to configure claude-desktop: claude-desktop LLM gateway setup is not supported on Windows yet
Error: failed to configure any detected tools

Claude Desktop is installed here (%APPDATA%\\Claude). %LOCALAPPDATA%\\Claude-3p is empty (third-party inference never configured). The failed run did not persist thv llm config and did not write a helper script.

This is the honest sibling of #6293. Cursor reports success while writing keys the app never reads. Claude Desktop refuses up front.

Root cause

configureCredentialHelper in pkg/client/llm_gateway_credential_helper.go returns immediately on runtime.GOOS == "windows". The shim is a POSIX /bin/sh script (~/.toolhive/llm/claude-desktop-helper.sh). The comment still calls Windows a follow-up.

#6326 already made thv llm token argv-safe for Codex (command + args, no shell). Claude Desktop did not get that shape.

Repro

ToolHive v0.46.0 (c6c425a), Windows 11, Claude Desktop present.

thv llm setup --client claude-desktop --lazy --gateway-url https://127.0.0.1:9 --issuer https://127.0.0.1:9 --client-id dummy-self-found --tls-skip-verify

Same error. thv llm config show still says the gateway is not configured.

origin/main still has the Windows return (checked 2026-09-04).

Suggested direction

Give Claude Desktop a Windows helper that execs thv llm token the same way Codex already does (executable + args, no /bin/sh). Keep the POSIX .sh on Darwin/Linux.

I would like to work on this after assignment. I will not open a PR until a maintainer assigns it.

Related

  • #6325 / #6326 (thv llm setup token-helper path on Windows)
  • #6293 (Cursor LLM setup silent no-op)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.