-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Agent generates unquoted shell command when workspace path contains spaces (breaks git worktree add) #11144
Copy link
Copy link
Open
Labels
area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.Agent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:launch-configsLaunch configurations, workflows, tab configs, and automation entry points.Launch configurations, workflows, tab configs, and automation entry points.bugSomething isn't working.Something isn't working.os:macmacOS-specific behavior, regressions, or requests.macOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Metadata
Metadata
Assignees
Labels
area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.Agent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:launch-configsLaunch configurations, workflows, tab configs, and automation entry points.Launch configurations, workflows, tab configs, and automation entry points.bugSomething isn't working.Something isn't working.os:macmacOS-specific behavior, regressions, or requests.macOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Description
The Warp Agent generated a shell command that interpolated a filesystem path containing spaces without quoting it. The shell split the path on whitespace, which caused
git worktree addto receive the wrong number of positional arguments and print itsusage:help instead of creating the worktree.The current workspace is
/Users/luizv/Developer/2026-05 Site da Jô— the space in "Site da Jô" is what breaks the command.Steps to reproduce
~/Developer/My Project).git worktree add).Actual behavior
The Agent ran:
The shell tokenizes
/Users/luizv/.warp/worktrees/2026-05 Site da Jô/turquoise-palo-verdeinto 4 separate arguments.git worktree addreceives too many positional args and prints its usage help. No worktree is created, but the failure mode is non-obvious because the command appears to "complete" — there is no explicit error message saying the path was misquoted.Expected behavior
The Agent should quote (or escape) paths that may contain spaces or other shell-significant characters when composing commands. Either:
or equivalent escaping. This is a general shell-safety issue — any path the Agent injects into a command string should be quoted by default, since the Agent cannot assume the user's workspace path is whitespace-free.
Environment