Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/windows-shell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Windows shell regressions

on:
push:
paths:
- 'app/data/action/run_shell.py'
- 'agent_core/core/prompts/context.py'
- 'tests/windows_shell/**'
- '.github/workflows/windows-shell.yml'
pull_request:
paths:
- 'app/data/action/run_shell.py'
- 'agent_core/core/prompts/context.py'
- 'tests/windows_shell/**'
- '.github/workflows/windows-shell.yml'

jobs:
shell:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Verify real cmd, Windows PowerShell and pwsh execution
run: python -m unittest discover -s tests/windows_shell -v
7 changes: 7 additions & 0 deletions agent_core/core/prompts/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@
- User Location: {user_location}
- Current Working Directory: {working_directory}
- Operating System: {operating_system} {os_version} ({os_platform})
On Windows, run_shell defaults to cmd. For PowerShell source select shell="powershell"
or "pwsh" and submit the raw script; run_shell launches the interpreter. For example,
command="Get-CimInstance Win32_LogicalDisk -Filter 'DriveType=3'" with shell="powershell".
Omit powershell -Command and cmd /c wrappers unless nesting is intentional. Read
run_shell's guidance and verify stdout even on success; nested quoting can silently
change the result. After a quoting failure, check the selected shell and partial
side effects before correcting the source. Avoid repeated escape-character guesses.
</agent_environment>
"""

Expand Down
Loading
Loading