[BUG]

Resolved 💬 2 comments Opened Jun 9, 2026 by jhdjam-spec Closed Jun 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

/bug Title: Multi-line here-string tool-call arguments intermittently fail with "malformed tool call" Body: Bash/PowerShell tool calls whose argument contains a multi-line here-string intermittently fail with "Your tool call was malformed and could not be parsed. Please retry." — the call is dropped before execution and succeeds on a verbatim retry (so it's a parse/transport flake, not a command syntax error). Reproduces most reliably with a PowerShell single-quoted here-string (@'...'@) carrying multi-line Cyrillic text, e.g. a git-commit wrapper: cd c:\project; & .\scripts\commit.ps1 -Message @' feat(site-content): подключить контакты к SiteContent - Footer и contacts/page стали async - ссылки мессенджеров из админки '@ Frequency: ~4× in one session on PowerShell here-strings + 1× on a Bash multi-line command. Impact: each failure wastes a turn and forces re-sending the full (often long) command. Env: Windows 11, Windows PowerShell 5.1 via the PowerShell tool, Claude Code, model Opus 4.8.

What Should Happen?

/bug Title: Multi-line here-string tool-call arguments intermittently fail with "malformed tool call" Body: Bash/PowerShell tool calls whose argument contains a multi-line here-string intermittently fail with "Your tool call was malformed and could not be parsed. Please retry." — the call is dropped before execution and succeeds on a verbatim retry (so it's a parse/transport flake, not a command syntax error). Reproduces most reliably with a PowerShell single-quoted here-string (@'...'@) carrying multi-line Cyrillic text, e.g. a git-commit wrapper: cd c:\project; & .\scripts\commit.ps1 -Message @' feat(site-content): подключить контакты к SiteContent - Footer и contacts/page стали async - ссылки мессенджеров из админки '@ Frequency: ~4× in one session on PowerShell here-strings + 1× on a Bash multi-line command. Impact: each failure wastes a turn and forces re-sending the full (often long) command. Env: Windows 11, Windows PowerShell 5.1 via the PowerShell tool, Claude Code, model Opus 4.8.

Error Messages/Logs

/bug Title: Multi-line here-string tool-call arguments intermittently fail with "malformed tool call"  Body: Bash/PowerShell tool calls whose argument contains a multi-line here-string intermittently fail with "Your tool call was malformed and could not be parsed. Please retry." — the call is dropped before execution and succeeds on a verbatim retry (so it's a parse/transport flake, not a command syntax error).  Reproduces most reliably with a PowerShell single-quoted here-string (@'...'@) carrying multi-line Cyrillic text, e.g. a git-commit wrapper:   cd c:\project; & .\scripts\commit.ps1 -Message @' feat(site-content): подключить контакты к SiteContent  - Footer и contacts/page стали async - ссылки мессенджеров из админки '@ Frequency: ~4× in one session on PowerShell here-strings + 1× on a Bash multi-line command. Impact: each failure wastes a turn and forces re-sending the full (often long) command. Env: Windows 11, Windows PowerShell 5.1 via the PowerShell tool, Claude Code, model Opus 4.8.

Steps to Reproduce

/bug Title: Multi-line here-string tool-call arguments intermittently fail with "malformed tool call" Body: Bash/PowerShell tool calls whose argument contains a multi-line here-string intermittently fail with "Your tool call was malformed and could not be parsed. Please retry." — the call is dropped before execution and succeeds on a verbatim retry (so it's a parse/transport flake, not a command syntax error). Reproduces most reliably with a PowerShell single-quoted here-string (@'...'@) carrying multi-line Cyrillic text, e.g. a git-commit wrapper: cd c:\project; & .\scripts\commit.ps1 -Message @' feat(site-content): подключить контакты к SiteContent - Footer и contacts/page стали async - ссылки мессенджеров из админки '@ Frequency: ~4× in one session on PowerShell here-strings + 1× on a Bash multi-line command. Impact: each failure wastes a turn and forces re-sending the full (often long) command. Env: Windows 11, Windows PowerShell 5.1 via the PowerShell tool, Claude Code, model Opus 4.8.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.153

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗