DNA News

Act on this, mostly signal

Why coding agents fail on Windows shells, and the fixes

What to do

Spawn executables with argument arrays, and use shell true for .cmd shims. Enforce rules with PreToolUse hooks that exit with code 2.

Why

Node's April 2024 change alters how .cmd shims run, which breaks agents on Windows.

Read the source at hackernoon.com

What the research found

A HackerNoon guide explains why AI coding agents fail on Windows shells and offers fixes: spawn executables with argument arrays, use shell: true for .cmd shims after Node's April 2024 change, and enforce rules with Claude Code PreToolUse hooks that exit code 2.

Claims and how well the evidence supports them

  1. Since Node's April 2024 security release, spawning a .cmd or .bat file requires shell: true 98%
  2. In Claude Code a PreToolUse hook with matcher PowerShell can block a command by exiting with code 2 99%

Evidence

Actionability rated high.