Answer: To fix CLINotFoundError, install Claude Code if it isn't installed, confirm the file exists and is the claude executable if you set cli_path, and if you rely on PATH resolution, confirm claude --version works in the same environment your application runs in. Status: Confirmed Entry: tool/claude-code/troubleshooting/fix-clinotfounderror Revision: 2 Digest: sha256:acc4f2a8b652ba4a (changes whenever the content changes) Timeline: Created: 2026-11-13T12:07:32Z Last changed: 2026-11-17T12:21:53Z (fix 3: — → confirm `claude --version` works in the same environment your application runs in) Last verified: 2026-11-20T12:17:35Z Next check: 2026-11-21T12:17:35Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of error | CLINotFoundError | [1] | 2026-11-20 fix 1 | Install Claude Code if it isn't installed. | [1] | 2026-11-20 fix 2 | If you set `cli_path`, confirm the file exists and is the `claude` executable. | [1] | 2026-11-20 fix 3 | confirm `claude --version` works in the same environment your application runs in | [1] | 2026-11-20 Sources: [1] Anthropic. "Troubleshoot the Agent SDK". https://code.claude.com/docs/en/agent-sdk/troubleshooting.md Role: primary. Accessed: 2026-11-20T12:17:35Z Quote: "connecting fails with a `CLINotFoundError`" (Supports: error) Quote: "Install Claude Code if it isn't installed." (Supports: fix 1) Quote: "If you set `cli_path`, confirm the file exists and is the `claude` executable." (Supports: fix 2) Quote: "confirm `claude --version` works in the same environment your application runs in" (Supports: fix 3) Published: 2026-11-20T10:32:58Z Snapshot SHA-256: d35164042d96d0fc667e6ccb7e3b98f3122f76abadedb2d496f2eaea23598090 (captured 2026-11-17T12:21:55Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:21:53Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:17:35Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:35Z Last attempt: 2026-11-20T12:17:35Z Notes and limitations: Extracted automatically from a single official source (section "CLINotFoundError: Claude Code not found"). Related: https://latestn.com/tool/claude-code/troubleshooting/fix-command-not-found How do I fix 'command not found: claude' after installing Claude Code? https://latestn.com/tool/claude-code/troubleshooting/fix-commands-path-not-found How do I fix the "commands path not found" error when building a Claude Code plugin? https://latestn.com/tool/claude-code/troubleshooting/fix-garbled-text-integrated-terminal How do I fix garbled or corrupted text in an editor's integrated terminal when using Claude Code? https://latestn.com/tool/claude-code/troubleshooting/fix-auto-compact-thrashing How do I resolve auto-compaction thrashing errors in Claude Code? https://latestn.com/tool/claude-code/troubleshooting/fix-broken-settings-file How do I fix a broken Claude Code settings file? https://latestn.com/tool/claude-code/troubleshooting/fix-cliconnectionerror-failed-to-start What causes a CLIConnectionError: Failed to start Claude Code and how do I resolve it? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T12:21:53Z | changed | fix 3: — → confirm `claude --version` works in the same environment your application runs in | [1] 2026-11-17T12:21:53Z | changed | fix 2: — → If you set `cli_path`, confirm the file exists and is the `claude` executable. | [1] 2026-11-17T12:21:53Z | changed | fix 1: — → Install Claude Code if it isn't installed. | [1] 2026-11-17T12:21:53Z | changed | error: — → CLINotFoundError | [1] 2026-11-17T12:21:53Z | changed | error name: CLINotFoundError → — | [1] 2026-11-17T12:21:53Z | changed | fix step 3: confirm `claude --version` works in the same environment your application runs in → — | [1] 2026-11-17T12:21:53Z | changed | fix step 2: If you set `cli_path`, confirm the file exists and is the `claude` executable. → — | [1] 2026-11-17T12:21:53Z | changed | fix step 1: Install Claude Code if it isn't installed. → — | [1] 2026-11-13T12:07:32Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/troubleshooting/fix-clinotfounderror/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/troubleshooting/fix-clinotfounderror POST: https://latestn.com/dispute/tool/claude-code/troubleshooting/fix-clinotfounderror with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/troubleshooting/fix-clinotfounderror?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I fix the CLINotFoundError when using the Claude Code Agent SDK? Revision 2, last verified 2026-11-20T12:17:35Z. https://latestn.com/tool/claude-code/troubleshooting/fix-clinotfounderror (accessed 2026-11-21T09:57:48Z). @misc{LatestN_tool_claude_code_troubleshooting_fix_clinotfounderror_r2, title = {How do I fix the CLINotFoundError when using the Claude Code Agent SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/troubleshooting/fix-clinotfounderror}}, note = {Revision 2; digest sha256:acc4f2a8b652ba4a; last verified 2026-11-20T12:17:35Z; accessed 2026-11-21T09:57:48Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/troubleshooting/fix-clinotfounderror