claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Tool Execution Failure: Invalid Bash Command Argument

Open avastmick opened this issue 1 year ago • 7 comments

Bug Description The AI cannot use any Bash or similar tools, as per the following output:

⏺ Let me create the new directory structure:

⏺ Bash(mkdir -p templates styles output/cv output/letter) ⎿  Error: The argument 'args[2]' must be a string without null bytes. Received "source <(cat <<'CLAUDE_SNAPSHOT_EOF'\n" + '# Snapshot file\n' + '# Unset all aliases to avoid conflicts with functions...

Environment Info

  • Platform: darwin
  • Terminal: tmux
  • Version: 1.0.54
  • Feedback ID: 68e02359-36fa-4506-b9ef-9455b58be38c

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:892:11)\n    at execSync (node:child_process:964:15)\n    at DI (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:730:2037)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:41635\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:542:14406)\n    at PF (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:39420)\n    at $X (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:38286)\n    at MB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:44255)","timestamp":"2025-07-17T03:21:18.842Z"}]

avastmick avatar Jul 17 '25 03:07 avastmick

I can report that I am also seeing this issue, just started recently as well. I can produce additional reports if helpful.

joshuaMarple avatar Jul 17 '25 04:07 joshuaMarple

Same here

ArturoTorresMartinez avatar Jul 17 '25 04:07 ArturoTorresMartinez

Same here. It happen for Kitty as well, not just tmux :(

AnhQuanTrl avatar Jul 17 '25 05:07 AnhQuanTrl

I just fix the issue. What I did was type claude update and then it will actually downgrade to a minor version. I think the latest version has an issue.

AnhQuanTrl avatar Jul 17 '25 06:07 AnhQuanTrl

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 03 '25 10:12 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 03 '26 10:01 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 10 '26 14:01 github-actions[bot]