[BUG] Claude code is creating a NUL file when any tool throws and error.

Resolved 💬 2 comments Opened Aug 9, 2025 by phoenixtail26 Closed Aug 9, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.72
  • Operating System: Windows 11
  • Terminal: Claude code plugin in Rider IDE

Bug Description

A NUL file is created when a tool throws an error (like a bash command). This is a duplicate of issue #4206 which was closed but the issue isn't solved.

Steps to Reproduce

  1. Run a tool that will throw an error. Bash command, mcp server, etc

Expected Behavior

Error is displayed and no file is created

Actual Behavior

NUL file created

Additional Context

I was trying to setup the serena mcp and it kept throwing errors when pattern matching -  Error executing tool: path is on mount '\\\\.\\NUL', start on mount 'C:'. Eventually tracked it down to this NUL file in the project root which kept being recreated when using Claude Code.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗