🐛 Bug: Claude Code freezes indefinitely on Windows after installing Ponytail
💻 Environment
- OS: Windows 10 (PowerShell 5.1)
- Node.js: v18+
- Claude Code: Latest (VSCode extension)
- Ponytail: Installed via
npm install -g @dietrichgebert/ponytail
🛑 Symptoms
After installing Ponytail, Claude Code freezes completely when submitting any prompt. The terminal becomes unresponsive — no spinner, no output, no error. Only Ctrl+C recovers the session.
A secondary issue occurs on first launch:
Failed to set model: Unexpected token '', "{ "p"... is not valid JSON
This is caused by a UTF-8 BOM prepended by PowerShell when writing settings.json.
🔍 Root Cause Analysis
Two distinct issues were identified during investigation:
1. Stdin EOF deadlock (Critical — causes the freeze)
ponytail-mode-tracker.js (the UserPromptSubmit hook) reads stdin using the following pattern:
process.stdin.on('data', chunk => { input += chunk; });
process.stdin.on('end', () => {
// parse JSON, process command, exit
});
🐛 Bug: Claude Code freezes indefinitely on Windows after installing Ponytail
💻 Environment
npm install -g @dietrichgebert/ponytail🛑 Symptoms
After installing Ponytail, Claude Code freezes completely when submitting any prompt. The terminal becomes unresponsive — no spinner, no output, no error. Only
Ctrl+Crecovers the session.A secondary issue occurs on first launch:
This is caused by a UTF-8 BOM prepended by PowerShell when writing
settings.json.🔍 Root Cause Analysis
Two distinct issues were identified during investigation:
1. Stdin EOF deadlock (Critical — causes the freeze)
ponytail-mode-tracker.js(theUserPromptSubmithook) reads stdin using the following pattern: