Command runner false-positives: echo string with hyphens flagged as flag, glob patterns blocked in safe contexts
Description
Two related command-runner parsing issues that break common workflows:
Issue A: Echo string mis-parsed as flag
Running a bash command containing:
\\\bash\
echo "---- Checking service after 15s ----"
\\
The command runner warns: "Command contains quoted characters in flag names" and blocks execution pending confirmation.
The string is just echo output text. It begins with hyphens inside quotes, which the runner incorrectly interprets as a flag argument.
Expected: Command runs without warning — this is a string literal, not a flag.
Actual: Warning triggers, workflow interrupted with unnecessary confirmation prompt.
Issue B: Glob patterns blocked in safe single-directory contexts
Running:
\\\bash\
rm -f .../ibkr_data_service*.pyc
\\
Blocked because a wildcard is present in the command.
Expected: Narrow glob patterns within a single directory (e.g., \*.pyc\ files) should either be allowed or expanded with a preview for confirmation.
Actual: All glob patterns are blocked regardless of scope or safety, making routine cleanup workflows (clear pycache, remove temp files) unnecessarily painful.
Impact
Both issues force unnecessary interactive prompts during automated/scripted workflows. The echo false-positive is particularly disruptive in scripts that use decorative output formatting.
Suggested Fixes
Issue A: Don't flag content inside echo/printf string arguments as flags. The parser should recognize that arguments to echo/printf are output text, not command flags.
Issue B: Either:
- Allow globs within a single directory when the pattern is narrow (e.g., only \
*.pyc\, \*.tmp\, \*.log\) - Provide a "safe delete" helper that expands globs and shows exactly what will be deleted before confirmation
Environment: Claude Code v2.1.58, Windows 11 Pro Build 26200
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗