[BUG] Command suggestions with line continuations have trailing whitespace after backslashes
Resolved 💬 7 comments Opened Apr 17, 2026 by mjaggard Closed May 17, 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?
When Claude suggests a command line to run it puts it on multiple lines with a \ at the end of each line. However the CLI seems to have loads of spaces after the \ so copying that and pasting it into a terminal doesn't work.
What Should Happen?
The script suggested should work when copied and pasted from the terminal.
Error Messages/Logs
$ aws ecs describe-task-definition \
--task-definition weaviate-node1-prod \
--region eu-west-2 \
--query 'taskDefinition.containerDefinitions[0].healthCheck'
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: --task-definition
zsh: command not found: --task-definition
zsh: command not found: --region
zsh: command not found: --query
Steps to Reproduce
- Ask Claude for a command line that will go over more than one line. For example "give me a command line to call the GitHub http API using curl to post a new issue"
- Copy the output
- Paste the output into a terminal
- Fail to run it
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
1.1.111
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
IntelliJ IDEA terminal
(Also other terminals such as the one built into MacOS)
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗