Skip to content

Conversation

@burgercrisis
Copy link

I found, fixed, tested, and confirmed several issues related to Git bash fork, powershell and cmd. Previously many command calls would fail, making the agent pretty useless at very many tasks on Windows, at least on Desktop. Not sure if it was an issue on TUI/CLI as I am... one of those guys. There are still some issues I will be resolving, but I figured I should PR this batch.

Unfortunately there are now some merge conflicts but I hey that probably happens every few hours some days

Issue
Add Git cmd and MinGW paths to git-env.ts 100% dank now
Fix stream reading race condition 100% dank now
Remove duplicate abort listeners from bash.ts 100% dank now
Add stream draining to prompt.ts 100% dank now
Fix newString undefined bug 100% dank now
Fix desktop race condition 100% dank now
Add shell bypass to prompt.ts 100% dank now
Add unique match identification 100% dank now
Fix Unicode character matching 100% dank now
Fix multi-line patterns 100% dank now

Ignore VSCode AI rules files
- Add GitHub instructions for codacy
- Add Windows command execution issues investigation
- Add TUI vs GUI themes planning
- Add desktop GUI themes investigations
- Change shouldBypassShell to false for PowerShell (proper argument parsing)
- Improve stream reader to guarantee streams drain before returning
- Fixes Issue anomalyco#17 (data loss) and Issue anomalyco#27 (argument parsing)
- Add detectCommandShell() function to identify shell types
- Add parseCommand() function for Windows command parsing
- Add shell bypass for native Windows commands (PowerShell, CMD)
- Improves Windows command execution reliability
- Update shouldBypassShell expectations to false for PowerShell
- Reflects the fix for proper argument parsing (Issue anomalyco#27)
- Add bash-stream.test.ts for stream testing
- Add bash.test.ts for bash tool testing
Pre-push hook was causing issues on Windows (version mismatch, slow typecheck).
The typecheck validation can still be run manually with "bun typecheck" when needed.
devplans\verified-fixes-summary.md contains fixes

devplans\windows-command-execution-issues.md contains status on other issues
…d dank

Windows Command Execution Fixes:
- Add detectCommandShell() and parseCommand() functions for shell detection
- Implement direct PowerShell execution bypassing cmd.exe wrapper
- Add shell built-ins detection and needsShellExecution function
- Fix stream draining to prevent race conditions (Promise.all)
- Remove duplicate abort listeners

Edit Tool Improvements:
- Add newString validation guard (handles undefined/null/empty)
- Add UnicodeNormalizedReplacer for smart quotes and em-dashes
- Fix multi-line pattern matching with empty lines (Issue anomalyco#26)
- Add unique match identification for replaceFirst functionality
- Improve block anchor matching with variable gap handling

Documentation:
- Add verified-fixes-summary.md documenting all fixed issues
- Add windows-command-execution-issues.md comprehensive analysis
- Add linux-unix-mac-compatibility-analysis.md for cross-platform impact

Fixes: Issues anomalyco#2, anomalyco#3, anomalyco#4, anomalyco#5, anomalyco#7, anomalyco#8, anomalyco#9, anomalyco#15, anomalyco#19, anomalyco#26
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@burgercrisis
Copy link
Author

I did just realize theres a tools folder I forgot to remove here...

@burgercrisis
Copy link
Author

I have an update; fixed more powershell related issues. 190 live powershell/cmd tests passed live in opencode now. Also some test scripts included because I found its easy to revert some of these fixes working on others

63f6279

@Hona
Copy link
Collaborator

Hona commented Jan 9, 2026

Do a self review first. Random unrelated files.

@burgercrisis
Copy link
Author

burgercrisis commented Jan 10, 2026

Do a self review first. Random unrelated files.

Sorry about that. I removed those files and did a thorough investigation to make sure no unrelated code snuck in. I ended up finding a few more fixes related to windows/powershell/etc that also improved some things for linux and mac users so compatibility should be up a lot more in general and the agent should be able to successfully call many more kinds of commands.

f40afe3 - I cleaned up test scripts as well on this latest commit

ac8066d - And in case yall want the tests to prevent regressions theyre in the commit just prior

@burgercrisis
Copy link
Author

I am closing this to reopen because I found a much better fix completely different branch and just merged it with the most recent stable release with 0 issues. Sorry for being annoying!

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.

2 participants