Skip to content

Windows: claudeBinaryPath resolved from config but SDK fails with "native binary not found" #1723

@wikimatt

Description

@wikimatt

Environment

  • Archon version: v0.3.12 (compiled binary, archon-windows-x64.exe)
  • Platform: Windows 10 Pro (win32-x64)
  • Claude Code: v2.1.144 (npm-installed globally via npm install -g @anthropic-ai/claude-code)

Config

~/.archon/config.yaml:

assistants:
  claude:
    claudeBinaryPath: C:\Users\123\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-
ai\claude-code-win32-x64

What happens

  1. Run archon workflow run archon-assist "test"
  2. Archon correctly resolves the binary path from config —log confirms:
    INFO claude.binary_resolved
        binaryPath: "C:\Users\...\claude-code-win32-x64"
        source: "config"
    
  3. Path is passed to Claude Agent SDK as pathToClaudeCodeExecutable
  4. SDK throws:
ReferenceError: Claude Code native binary not found at C:\Users\123\AppData\Roaming\npm\node_modules\@anthropic-ai\cla
ude-code\node_modules\@anthropic-ai\claude-code-win32-x64. Please ensure Claude Code is installed via native installer
 or specify a valid path with options.pathToClaudeCodeExecutable.
    at <anonymous> (B:/~BUN/root/archon-windows-x64.exe:97:18436)
    at emitError (node:events:43:23)
    at <anonymous> (node:child_process:718:20)

Why this is unexpected

  • claude.exe (229 MB) exists inside the specified directory
  • Running the binary directly works: claude.exe --version2.1.144 (Claude Code)
  • The error originates from node:child_process spawn, suggesting the SDK's native binary discovery/spawn fails
    inside the Bun-compiled Archon binary on Windows
  • The path survives Archon's fileExists check (existsSync returns true for the directory), but the SDK cannot
    spawn it

Tried

  • Path as directory: ...\claude-code-win32-x64 →same error
  • Path as full executable: ...\claude-code-win32-x64\claude.exe →same error
  • CLAUDE_BIN_PATH env var not set (expecting config.yaml to work in compiled binary mode per binary-resolver.ts)

Relevant code path

binary-resolver.tsprovider.ts line 512 (pathToClaudeCodeExecutable: cliPath) →Claude Agent SDK
child_process.spawn()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions