Summary
@testmuai/kane-cli@0.2.11 fails to locate the platform-specific v16-runner binary (@testmuai/kane-cli-darwin-arm64, etc.) when installed via pnpm, because the resolver in dist/index.js only searches up to 3 levels above the dist/ directory and the project-root node_modules/ is 4 levels up.
Run output (with KANE_DEV_MODE=1):
[exit-manager] shutdown(2): CLI error: v16-runner not found. Build the binary with `cd v16-runner && python build.py` or ensure Python is available.
Without KANE_DEV_MODE, the CLI exits silently with status 2 and produces no stdout/stderr after SCREENSHOT_SAS_OK in the session log — making this very hard to diagnose.
Repro
pnpm add -D @testmuai/kane-cli
pnpm exec kane-cli login --oauth # works
pnpm exec kane-cli run "Open https://example.com" --agent --headless --max-steps 3 --timeout 60 </dev/null
# exit 2, empty output
Environment: macOS 25.2 arm64, Node 25.9.0, pnpm 10.32.0, kane-cli 0.2.11.
Root cause
In dist/index.js, function po() resolves v16-runner as:
let c = [
Ve(vt, "..", "node_modules", l, "bin", e),
Ve(vt, "..", "..", "node_modules", l, "bin", e),
Ve(vt, "..", "..", "..", "node_modules", l, "bin", e),
];
Where vt = path.dirname(import.meta.url) = node_modules/@testmuai/kane-cli/dist/ and l = "@testmuai/kane-cli-darwin-arm64".
Expanded:
node_modules/@testmuai/kane-cli/node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runner
node_modules/@testmuai/node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runner
node_modules/node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runner
None of these match the actual pnpm layout, where the optional dep ends up at:
node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runner
That path is reachable from vt via four .. (not three): vt/../../../../node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runner.
Workaround
Symlink the runner into one of the locations the resolver checks:
mkdir -p node_modules/@testmuai/kane-cli/node_modules/@testmuai
ln -sf ../../../kane-cli-darwin-arm64 \
node_modules/@testmuai/kane-cli/node_modules/@testmuai/kane-cli-darwin-arm64
After this, the run completes normally (run_end status:"passed").
Suggested fix
Add a fourth candidate at one more level up, or resolve the package via require.resolve(\${l}/package.json`, { paths: [vt] })` and dirname from there — that handles npm, pnpm, yarn-pnp/classic uniformly.
Also
When v16-runner is missing, surfacing the error only behind KANE_DEV_MODE makes diagnosis painful — please log it to stderr unconditionally (or at least print a hint with exit code 2).
Summary
@testmuai/kane-cli@0.2.11fails to locate the platform-specificv16-runnerbinary (@testmuai/kane-cli-darwin-arm64, etc.) when installed via pnpm, because the resolver indist/index.jsonly searches up to 3 levels above thedist/directory and the project-rootnode_modules/is 4 levels up.Run output (with
KANE_DEV_MODE=1):Without
KANE_DEV_MODE, the CLI exits silently with status 2 and produces no stdout/stderr afterSCREENSHOT_SAS_OKin the session log — making this very hard to diagnose.Repro
Environment: macOS 25.2 arm64, Node 25.9.0, pnpm 10.32.0, kane-cli 0.2.11.
Root cause
In
dist/index.js, functionpo()resolvesv16-runneras:Where
vt = path.dirname(import.meta.url)=node_modules/@testmuai/kane-cli/dist/andl = "@testmuai/kane-cli-darwin-arm64".Expanded:
node_modules/@testmuai/kane-cli/node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runnernode_modules/@testmuai/node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runnernode_modules/node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runnerNone of these match the actual pnpm layout, where the optional dep ends up at:
That path is reachable from
vtvia four..(not three):vt/../../../../node_modules/@testmuai/kane-cli-darwin-arm64/bin/v16-runner.Workaround
Symlink the runner into one of the locations the resolver checks:
After this, the run completes normally (
run_endstatus:"passed").Suggested fix
Add a fourth candidate at one more level up, or resolve the package via
require.resolve(\${l}/package.json`, { paths: [vt] })` and dirname from there — that handles npm, pnpm, yarn-pnp/classic uniformly.Also
When v16-runner is missing, surfacing the error only behind
KANE_DEV_MODEmakes diagnosis painful — please log it to stderr unconditionally (or at least print a hint with exit code 2).