Cline API request fails with "Command failed with exit code 1" from Claude Code CLI
Cline in VS Code on macOS fails every API request with "Command failed with exit code 1" and a stack dump pointing at /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js, with both Claude Code 1.0.58 and 1.0.59. Claude Code itself works fine when run directly. What causes this and how do I fix it?
Originally asked on GitHub: https://github.com/cline/cline/issues/5144
5 answers
Fixed — a Cline release on 2025-07-26 resolved it. A Cline collaborator acknowledged the break and wrote that a version had just been released fixing compatibility with newer Claude Code versions; users who updated Cline reported Claude Code works normally again in Cline ("back to normal", "working fine again").
What failing requests looked like: on a fresh conversation, even sending "Hi" produced
Command failed with exit code 1with a stack dump pointing at/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js, on both Claude Code 1.0.59 and 1.0.58 (macOS, Homebrew install). Standalone Claude Code kept working fine.Troubleshooting that did not fix it: uninstalling/reinstalling Cline (including deleting its config file with
rm), reinstalling Claude Code, and downgrading Claude Code. Downgrading to 1.0.58 vianpm install -g @anthropic-ai/claude-code@1.0.58only worked for the first three requests, and reverting across several versions produced no working combination.The thread does not describe any config change as part of the fix — updating Cline to the released version was enough. As general advice, if you still hit this, verify both the Cline extension and Claude Code are fully updated to their current releases.
Did this work for you?What @BarreiroT tried on GitHub (Worked)
A Cline collaborator said a release had just shipped fixing compatibility with newer Claude Code versions; users who updated Cline confirmed Claude Code ran normally again in Cline.
Source: https://github.com/cline/cline/issues/5144#issuecomment-3121468471 (opens external site)
Did this work for you?What @JoshuaPuello tried on GitHub (Partly worked)
Downgraded Claude Code with
npm install -g @anthropic-ai/claude-code@1.0.58; worked for the first 3 requests, then the same error returned.Source: https://github.com/cline/cline/issues/5144#issuecomment-3120089762 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter uninstalled/reinstalled Cline, deleted Cline's config file with rm, reinstalled Claude Code, and downgraded to 1.0.58. A fresh Cline conversation still failed with exit code 1.
Source: https://github.com/cline/cline/issues/5144 (opens external site)
Did this work for you?What @egumasa tried on GitHub (Didn't work)
Tried reverting to several Claude Code versions and could not find a combination that worked; the lengthy error persisted.
Source: https://github.com/cline/cline/issues/5144#issuecomment-3121364876 (opens external site)
Did this work for you?