mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-04-25 01:25:52 +03:00
[PR #138] fix: resolve 'spawn node ENOENT' when SDK spawns claude CLI #138
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shannon-KeygraphHQ#138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/KeygraphHQ/shannon/pull/138
Author: @nitayStain
Created: 2/16/2026
Status: 🔄 Open
Base:
main← Head:fix/sdk-spawn-enoent📝 Commits (1)
51a7acbfix: resolve 'spawn node ENOENT' when SDK spawns claude CLI📊 Changes
2 files changed (+6 additions, -0 deletions)
View changed files
📝
Dockerfile(+3 -0)📝
src/ai/claude-executor.ts(+3 -0)📄 Description
Problem
The Claude Agent SDK fails with
spawn node ENOENTwhen attempting to run any agent inside the Docker container.Root Cause
Two issues:
Missing CLI: The
claudeCLI (@anthropic-ai/claude-code) was not installed in the Docker image. The SDK'squery()function spawns it as a subprocess.Stripped PATH: The
envoption passed to the SDK contained onlyANTHROPIC_API_KEYandCLAUDE_CODE_MAX_OUTPUT_TOKENS. The SDK uses this as the complete environment for the spawned process, soPATHwas missing and theclaudescript (#!/usr/bin/env node) couldn't locatenode.Fix
npm install -g @anthropic-ai/claude-codeto install the CLI.process.envintosdkEnvsoPATHand other system variables are inherited by the spawned process.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.