-
Notifications
You must be signed in to change notification settings - Fork 3.6k
WIP: Fix PowerShell command syntax issues in run_terminal_command tool #7973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WIP: Fix PowerShell command syntax issues in run_terminal_command tool #7973
Conversation
- Add platform-specific command syntax guidance - Provide PowerShell-specific examples and instructions - Distinguish between && (bash) vs ; (PowerShell) for command chaining - Include proper directory creation syntax for PowerShell - Update parameter descriptions to be platform-aware - Add comprehensive PowerShell syntax warnings for AI Resolves issues where AI generated bash-style commands that failed in PowerShell environment, causing directory navigation and command execution problems.
Nice! Curious if you have run this prompt for powershell as a rule and it's working as expected for you? |
Hello I could not test it yet. It should rather be marked as WIP. So people |
…tool - Fix inconsistent indentation in parameters and evaluateToolCallPolicy - Clarify that PowerShell redirection operators (> >> < |) do work - Add native PowerShell cmdlet examples (Get-ChildItem, New-Item, etc.) - Correct path navigation guidance to include ./ support - Add PowerShell-specific example with Get-ChildItem -Recurse - Distinguish between PowerShell aliases vs native cmdlets 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Can someone take it over? |
@PierrunoYT can you share steps you've taken to validate that this is working correctly? Also if this is ready for review please mark it as such |
Hello I could not test it or verify. |
Summary
This PR fixes PowerShell command syntax issues in the
runTerminalCommand
tool that were causing AI-generated commands to fail in Windows PowerShell environments.Problem
&&
instead of;
)Solution
getPlatformCommandGuidance()
function with comprehensive PowerShell syntax guidance;
) vs bash (&&
) command chainingmkdir
,ls
) and native cmdlets (New-Item
,Get-ChildItem
)./
usageChanges Made
;
) instead of&&
for PowerShellmkdir dir1, dir2
andNew-Item -ItemType Directory
./
paths work in PowerShellGet-ChildItem -Recurse *.js
Testing
Resolves command execution failures in PowerShell environments where bash-style syntax was being generated by AI agents.
🤖 Generated with Claude Code