Skip to content

clodex-claude as a VS Code claudeProcessWrapper runs the extension's unpatched binary, so clodex models never appear in the picker #234

Description

@bman654

What happens

The Claude Code VS Code extension ships its own Claude Code binary (reported on Windows at ~/.vscode/extensions/anthropic.claude-code-<version>-win32-x64/resources/native-binary/claude.exe). clodex patch patches the user's installed claude, not that copy, so the extension's model picker never lists clodex models.

Setting claudeCode.claudeProcessWrapper to clodex-claude does not fix it:

  1. It runs the wrong binary. The extension invokes the wrapper as <wrapper> <path-to-bundled-claude> <args...>, and src/claude-wrapper.ts execs the binary it is handed when that path is an executable file. So routing works (the proxy env is injected), but the picker stays empty because the bundled binary is unpatched.
  2. On Windows it can't be spawned at all. npm installs clodex-claude as .cmd/.ps1 shims with no .exe, and the extension spawns the wrapper without a shell, so the .cmd fails with spawn EINVAL.

The workaround documented in docs/windows-setup.md (#208) is a hand-built Go shim that ignores the handed-in path and execs the patched npm binary.

Reported and diagnosed in #196 (Windows 11, Claude Code 2.1.267, extension 2.1.267: the bundled binary's sha256 matched clodex's pristine backup).

Scope to decide

  • Whether clodex-claude should prefer the clodex-patched install when the handed-in binary is a known-unpatched build of the same version, or whether clodex patch should also patch extension-bundled binaries.
  • Whether to ship a Windows-spawnable launcher.
  • Not yet verified: whether the macOS/Linux extensions bundle a binary the same way (likely, but no one here has checked). Also note the extension skips its own update check and moves permission-mode resolution out of the CLI when a wrapper is set.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions