Skip to content

fix: use argv-safe grep execution#7

Open
Gujiassh wants to merge 1 commit intosanbuphy:mainfrom
Gujiassh:fix/grep-argv-handling
Open

fix: use argv-safe grep execution#7
Gujiassh wants to merge 1 commit intosanbuphy:mainfrom
Gujiassh:fix/grep-argv-handling

Conversation

@Gujiassh
Copy link
Contributor

Summary

  • replace shell-string grep execution in agent-claudecode.py with an argv-style subprocess call
  • distinguish real grep failures from the normal returncode == 1 no-match case
  • add focused regression tests for both no-match and actual grep error behavior

Validation

  • python3 -m unittest tests.test_agent.AgentClaudeCodeRegressionTests.test_grep_returns_no_matches_on_exit_code_one tests.test_agent.AgentClaudeCodeRegressionTests.test_grep_surfaces_real_grep_errors

Notes

  • this PR stays independent from the open nanoAgent lines #4 and #5; it only touches the ClaudeCode grep helper path and its new tests

Stop the ClaudeCode grep helper from shell-quoting user patterns into a command string so paths with spaces and real grep errors are handled predictably.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant