Troubleshoot the Agent SDK changedagent-sdk/troubleshooting
Nearest release: v2.1.335, published 9 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 2 Dec 2026 12:11 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 2 Dec 2026 12:37 UTC.
Upstream edited
Recorded here
Lines+3added
Lines−2removed
From line
74
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits18to this page, all time
The whole hunk
from line 74, old and new numbered
/
from line 74
7474| Message | SDK | What it tells you |
7575| - | - | - |
7676| `Failed to start Claude Code: <detail>` | Python | The rest of the message is the operating system's own error |
77| `Claude Code executable at <path> exists but failed to launch` | TypeScript | The script at the configured path can't run |
78| `Claude Code native binary at <path> exists but failed to launch` | TypeScript | The binary can't run, with a libc suggestion appended to the message |
77| `Claude Code executable at <path> exists but failed to launch` | TypeScript | The script at the configured path can't run, or the [`cwd`](https://code.claude.com/docs/en/agent-sdk/typescript#options) directory doesn't exist |
78| `Claude Code native binary at <path> exists but failed to launch` | TypeScript | The binary can't run, with a libc suggestion appended to the message, or the `cwd` directory doesn't exist |
7979| `Failed to spawn Claude Code process: <detail>` | TypeScript | Any other launch failure |
8080
8181In both SDKs, the usual cause is a resolved path that points at something that can't run, such as a text file, a directory, or a file without execute permission. Read the native-binary message's libc suggestion as one possible cause.
from line 83
8383To fix it in either SDK:
8484
8585* Confirm the configured path points at the `claude` executable itself and that the file has execute permission.
86* In TypeScript, check that the directory you set in the `cwd` option exists.
8687* If you don't need a custom path, remove `cli_path` in Python or `pathToClaudeCodeExecutable` in TypeScript so the SDK finds a CLI on its own, preferring its bundled copy.
8788* When the failing binary is the SDK's bundled copy in a container image, reinstall the SDK during the image build so the bundled binary matches the container's platform, or rebuild the image for the architecture it runs on. The usual cause is a binary that doesn't match the container's architecture or libc, or one that lost its execute permission in the image build.
8889
No line in this hunk matches that.