[Bug] 2.1.158 (Windows): multiple tool/harness issues found in a stress-test
Ran a ~25-call stress test of the tools on Claude Code 2.1.158 / Windows 11, exercising the Bash, PowerShell, Read, Write, Edit, Glob, and Grep tools. The issues found are below, most-severe first. Reproductions are bash unless noted.
Environment
- Claude Code: 2.1.158
- Platform: Windows 11 (win32)
- Shells available: bash (Git for Windows / MINGW64, git 2.52.0.windows.1) and PowerShell 5.1.26100.8457
- node v25.9.0
---
1. [High] A failing tool call cancels still-running sibling calls in the same parallel batch
When several tool calls run in one parallel batch and one of them fails, the siblings that are still running are aborted with:
Cancelled: parallel tool call <failing call> errored
Their output is discarded even though they are independent of the call that failed.
Repro — two Bash calls in one message (one parallel batch):
- A:
sleep 1; echo done - B:
nonexistent_command_xyz# exits 127, command not found
B returns its exit-127 error; A is cancelled with Cancelled: parallel tool call Bash(nonexistent_command_xyz) errored.
Only siblings that are still running when the failure lands are cancelled. Holding B constant and making A instant (echo ok) lets both return. So whether independent work is lost is timing-dependent.
Expected: each tool call resolves independently; one failure should not cancel unrelated siblings.
2. [Medium] On Windows the session shell defaults to PowerShell 5.1, where the model's common syntax errors out
The environment reports the shell as PowerShell and instructs PowerShell syntax. Routine POSIX/bash constructs then fail in PowerShell 5.1, costing retries:
echo a && echo b-> ParserError:The token '&&' is not a valid statement separator in this version.$x ?? 10-> ParserError:Unexpected token '??' in expression or statement.
bash (MINGW64) is installed on this machine and avoids all of these. Defaulting Windows sessions to PowerShell 5.1 — which lacks &&, ??, and other syntax the model habitually emits — steers it into a shell where its natural commands break, when bash is present and would not.
3. [Low] Reading a directory leaks a raw Node errno
Read on a directory returns:
EISDIR: illegal operation on a directory, read 'C:\Users\ryan\.claude'
whereas Read on a missing file returns a friendly File does not exist. Note: your current working directory is .... The directory case should be formatted consistently rather than leaking the raw errno.
4. [Low] Grep zero-match prints two redundant messages
Grep in count mode with no matches returns both No matches found and Found 0 total occurrences across 0 files.
5. [Doc] Tool-guidance inaccuracies
- Guidance states unix
head/tail"do not exist in PowerShell" — they work here (Git-for-Windows coreutils on PATH). - Bash-tool guidance states "foreground
sleepis blocked" — a 2-second foregroundsleepran to completion normally.
---
Confirmed working-as-designed (listed only for completeness, not bugs): PowerShell Out-File default encoding is UTF-16LE with BOM; a native exe writing to stderr via 2>&1 wraps as NativeCommandError, setting $? to False while $LASTEXITCODE stays 0.