AIToday
AI Coding AssistantsZenn AI/MLPublished: Nov 29, 2026, 10:01 JST

Claude Code and Codex CLI break silently in 40 places on Windows

Send on LINE
Claude Code and Codex CLI break silently in 40 places on Windows

3 Key Points

  1. What happened

    Claude Code and Codex CLI break silently in 40 reproducible places on Windows, including exit codes returning 1 instead of 2, Japanese text becoming "?", and hooks that let writes through.

  2. Why it matters

    Because most failures show no error, teams running unattended jobs via claude -p or Task Scheduler may only notice the wrong results, not the breakage.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

The catalogue groups most of the 40 cases into four patterns. Exit codes arrive as the wrong number: powershell -Command turns a script's exit 2 into 1, and Claude Code reads 2 as "stop" while treating 1 or 127 as "continue." The default text encoding differs by location: Windows PowerShell 5.1 converts piped text to ASCII, reads external output as cp932 on Japanese Windows, and reads BOM-less .ps1 files the same way. Path spelling shifts meaning between Git Bash, the Bash tool and Windows itself. And safety devices fail open: hooks that time out or cannot start let Claude Code proceed by default unless onFailure: block is set.

The practical consequence is invisibility. Most of the cases surface no error, or an error worded differently from the real cause. They are easy to miss when working interactively and show up mainly when claude -p or Task Scheduler runs unattended, where only the results drift. The one-line doctor script is aimed at narrowing that gap: the author says results were reproduced on the author's own PC, and asks readers to report cases not on the list, or ones that no longer occur after a version update.

FAQ
How do I check whether my PC has these problems?
Open Windows PowerShell 5.1 (not PowerShell 7 or Command Prompt) and paste the one-line script. It runs small checks and lists which symptoms occur, with a password to each symptom page.
Why does the default check skip most of the 40 cases?
It checks 14 cases that don't require calling claude. Another 25 (t14, h01–h24) need Claude Code actually running and would use your usage quota, and t13 is excluded because it is slow.
Is the script safe to run?
It creates one folder under %TEMP%, works only inside it, then deletes only that folder. It sends nothing beyond the initial download and does not use administrator rights.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleFirefox Smart Window picks Mistral Small 4 as recommended model