Skip to content

fix: escape -- flags in process tool commands - #846

Merged
avoidwork merged 1 commit into
mainfrom
fix/process-tool-dash-dash-flags
Aug 22, 2026
Merged

fix: escape -- flags in process tool commands#846
avoidwork merged 1 commit into
mainfrom
fix/process-tool-dash-dash-flags

Conversation

@avoidwork

@avoidwork avoidwork commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Description

The process tool's shell command parser rejects commands containing -- flags (e.g., --head, --base, --json). The parser interprets -- as tool parameter delimiters rather than shell argument markers, causing schema validation failures.

This fix escapes -- sequences to \-\- before passing commands to the shell, preventing premature parsing while preserving the original command semantics.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)

Testing

  • Commands with -- flags now pass through correctly (e.g., gh pr list --head docs/foo --base main --state open)
  • Simple commands continue to work as before
  • Regression tests should cover common CLI patterns (gh, git, npm, curl)

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Closes #845

The shell command parser intercepts -- and treats it as a parameter
delimiter, causing schema validation failures for commands like
'gh pr list --head docs/foo --base main'. Escape -- sequences
before passing to the shell to prevent premature parsing.
@avoidwork avoidwork added the bug Something isn't working label Aug 22, 2026
@avoidwork avoidwork self-assigned this Aug 22, 2026
@avoidwork
avoidwork merged commit 96ccae4 into main Aug 22, 2026
3 checks passed
@avoidwork
avoidwork deleted the fix/process-tool-dash-dash-flags branch August 22, 2026 23:18
@avoidwork avoidwork mentioned this pull request Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: process tool rejects commands with -- flags

1 participant