[BUG] Claude Code SDK unable to find executable
Resolved 💬 3 comments Opened Sep 6, 2025 by elct9620 Closed Jan 5, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I use the latest SDK (@anthropic-ai/claude-code@1.0.108) to run Claude without providing an executable path, it returns an error message saying executable not found.
What Should Happen?
The SDK can call Claude Code correctly when installed via native / npm global.
Error Messages/Logs
file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9950
throw new ReferenceError(errorMessage);
^
ReferenceError: Claude Code executable not found at /Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/cli.js. Is options.pathToClaudeCodeExecutable set?
at ProcessTransport.initialize (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9950:11)
at new ProcessTransport (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9908:8)
at query (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14759:20)
at ClaudeReviewService$1.callAgent (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14825:31)
at ClaudeReviewService$1.review (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14813:29)
at ReviewCode.execute (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:4879:48)
at async Command$2.reviewAction (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:4904:2)
at async Command$2.parseAsync (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:2003:4)
at async file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:15006:1
Node.js v22.16.0
Steps to Reproduce
- Create a TypeScript project with
pnpm init
- with
{ "bin": "dist/index.js" }
- Add
@anthropic-ai/claude-codeas a dependency, implement some query - Compile to
dist/index.js - Use
npx .to run it - Got an executable not found error
npm install -gorclaude installto switch native version, both are unable to make it work correctly
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
1.0.67
Claude Code Version
1.0.108
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗