Windows: agent steps fail with "claude returned no result event" — claude.cmd shim doesn't stream stdout to the daemon
Summary
On Windows, every agent-driven pipeline step (review, test, document, lint) fails immediately with:
step review failed: agent review: claude returned no result event…even though the Claude Code CLI works perfectly when invoked directly with the exact same flags.
Environment
- no-mistakes v1.27.3 (daemon also seen after update-check to v1.28.0)
- Windows 10 (19044), daemon running unsandboxed from
%LOCALAPPDATA%\no-mistakes\no-mistakes.exe - Claude Code CLI v2.1.143 (
@anthropic-ai/claude-code), npm-global install —claude.cmdshim →node_modules\@anthropic-ai\claude-code\bin\claude.exe agent: auto(resolves toclaude);no-mistakes doctorreportsclaude ✓- Not sandbox / MAX_PATH / rate-limit related (all ruled out; the test step later ran a full project suite for 4.5 min and passed once the agent call worked)
Root cause
no-mistakes invokes the agent through the claude.cmd shim, which on Windows runs via cmd.exe. In that path claude.exe's stdout (the --output-format stream-json stream) is not streamed back to the no-mistakes daemon, so the daemon never receives a result event and reports "claude returned no result event".
Proof
- The exact pipeline invocation run directly in a shell returns a clean
{"type":"result","subtype":"success",...}event:claude -p "<prompt>" --verbose --output-format stream-json --json-schema <schema> --dangerously-skip-permissions - Routing the daemon's agent call through a thin Node wrapper that spawns
bin\claude.exedirectly (identical argv/stdin) makes the whole pipeline pass:review -> test -> document -> lint -> outcome: passed.
Workaround
Point the agent override at the real exe so no-mistakes bypasses the .cmd shim:
# ~/.no-mistakes/config.yaml
agent_path_override:
claude: 'C:\Users\<you>\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\bin\claude.exe'Suggested fix
On Windows, resolve and spawn the agent's underlying .exe directly (or ensure the child's stdout is inherited/piped through the cmd.exe layer) instead of launching the .cmd shim — likely applies to the other npm-shim agents (codex, opencode) too.
Source: kunchenguid/no-mistakes