[BUG] file named nul created on windows
Environment
- Platform (select one):
- [ ] Anthropic API
- [x] Other: Claude CLI
- Claude CLI version: 1.0.62
- Operating System: Windows <!-- specify version if known, e.g. Windows 11, Windows 10 -->
- Terminal: <!-- e.g. Command Prompt, PowerShell, Windows Terminal -->
Bug Description
Claude CLI is creating an unwanted file named "nul" in the current directory during execution. This appears to be related to incorrect handling of null device redirection on Windows systems.
Steps to Reproduce
- Run Claude CLI commands on Windows with version 1.0.62
- Check the current working directory after command execution
- Observe that a file named "nul" has been created
Expected Behavior
No "nul" file should be created. Output redirection to null device should properly use Windows equivalent (>nul or 2>nul) without creating actual files.
Actual Behavior
A file named "nul" is created in the current directory, suggesting the CLI is attempting to redirect output using Unix-style /dev/null syntax which Windows interprets as a literal filename.
Additional Context
This issue is likely caused by cross-platform compatibility problems where Unix-style null device redirection (>/dev/null) is being used instead of Windows-appropriate syntax (>nul). The behavior appears intermittent ("sometimes created"), which may depend on specific command paths or error handling routines within the CLI.
184 Comments
Found 3 possible duplicate issues:
If your issue is a duplicate, please close it and 👍 the existing issue instead.
🤖 Generated with Claude Code
I'm still experiencing this on version 1.0.72
You can delete by prepending \\?\ to the full path eg \\?\c:\myfolder\nul
On Sat, 9 Aug 2025 at 20:50, Robert McLaws @.***> wrote:
The way I've been deleting them is to add them in 7zip and have it delete the file after compressing. Really dumb, but the nul file borks my Git commits otherwise.
Confirmed same issue
I'm having the same issue.
Confirmed issue in the version: 1.0.90
Just happened, claude code v1.0.95
Super annoying. Please fix.
Hi, I found that in my case, this was happening because I had a Unix configuration in the additionalDirectories parameter of the .claude\settings.local.json file.
Updating it to the correct path prevented it from happening again.
<img width="537" height="302" alt="Image" src="https://github.com/user-attachments/assets/4f33bba9-39f9-49a0-8dda-da09c2e06e75" />
Aha, is this maybe related to when you work on the same project using both Windows and Linux PCs? I've noticed the Windows version getting better at "knowing" whether it is running in Windows or Linux...
Maybe when enabled this config (in webstorm plugin config)
<img width="985" height="737" alt="Image" src="https://github.com/user-attachments/assets/42097743-a034-4267-85f2-6db9c754a6b6" />
I'm not running Windows in Linux or vice versa, but I've been using GitBash for Windows and this file is being created from time to time.
Funny thing is, I could not delete the file without elevated permission, but Claude code once found it and easily removed it on its own.
Ask claude code to remove the "nul" file that it created. This worked for me.
genius! - works for me
I encountered the same issue with additional details that might help narrow down the root cause:
Trigger: Claude Code 2.0.8 was analyzing project file structure
File content (864 bytes):
This suggests Claude Code tried to generate a file tree visualization using a Python one-liner, which had a syntax error. The stderr was redirected to
nulbut created a physical file instead.Specific code path: File tree analysis/project structure inspection
This might help pinpoint which part of the CLI codebase is causing the issue.
Additional note on file access:
The
nulfile can be read and deleted normally using Git Bash:However, Windows native tools fail:
\\?\...)Get-FileHash: "Path does not exist"This confirms the issue is at the Win32 API semantic layer - Git Bash directly accesses NTFS and treats
nulas a regular filename, bypassing Windows reserved name checks.Workaround for users: If you encounter this issue, use Git Bash to remove the file:
This is ruining my commits on a regular basis. I use plastic for game dev and nul causes chaos on the filesystem and can absolutely corrupt the source control history.
This suddenly started happening to me today when I was just working on a regular React app. I made some prompts to change the JSX and there was the nul file with no apparent reason. Some of the operations I did was removing a Unicode character in a TypeScript file, removing a redundant import, and just working on regular JSX. Now it always creates the nul file when I open VS Code, doesn't even require input from me. And I'm purely working on a Windows machine.
Can confirm. Claude Code created a literal
nulfile during git merge operations on Windows with Git Bash. Appears to be using2>nul(Windows CMD syntax) instead of2>/dev/nullin a Unix shell context.Can confirm with version 2.0.22
Aurrgggghhhhh...
Very annoying bug to contend with during dev, while trying to save tokens -- I don't want to waste tokens asking Claude to clean up its mess.
same here. Windows11 running in a powershell. The Claude CLI starts having errors once the NUL file is created. I'm trying to fix that wit a skill (remove-nul). But Claude has a hard time remembering its skills.
Comfirmed issu in multiple projects. Same issue here. Windows 11 Powershell.
Got it - null on each project folder. can't copy, hard to delete. created everytime when run claude code.
I ended up writing a Python script to clean up all the folders:
When will this be fixed? No matter how I write in claude md file to check the OS and to use correct cmd shell, it still makes them all the time.
This helps to clean up but still it can happen it makes a ton of them not just one.
Yes it sucks and maybe I'm naive, but I just put it in the gitignore and have had no issues.
Interesting, I am worried if I do that maybe something in Windows might break?
Codex asked me to install WSL so maybe we could ask Claude to use that too, if it likes more to talk in Linux talk.
Haven't had an issue at all.
When I first started using windsurf I was using WSL and it sucked. I finally got things sorted and I'm working straight with Windows.
I've been running 3 Claude Code terminal sessions on three different monitors non-stop for about 10 days.
I hit my limit about 30 minutes before the reset yesterday and today I hit my limit just over an hour before the reset. (I'm getting more efficient in my prompting)
I'm on the $100 a month plan and have been just rocking it.
Yeah, adding it to the gitignore was the simplest solution and have had no problems.
Thank you for the sample PowerShell script, that did the trick for me. Wish Claude would stop creating NUL in the first place though.
Having the same issue on Windows. Even worse, if the nul file is pushed to the repo, cloning will fail:
If you're not able to delete the file, try this:
cdinto the directory containing thenulfile.rm -rf <filename>Source: https://learn.microsoft.com/en-us/troubleshoot/windows-server/backup-and-storage/cannot-delete-file-folder-on-ntfs-file-system
More than 3 months and still not fixed. Why not use Claude Code to fix Claude Code?
Just to confirm this issue is still happening in the latest build of Claude Code cli, as someone mentioned before its seems to be when doing bash etc in windows if there is command with '>value' and that might be a null value but in windows its a dos command for making a file i.e. 'dir . >filelist.txt' etc. Please see if some Claude dev can sort this, thanks. Great job on Claude code so far :-)
Happening with claude code vs extension. Really needs a fix, stops unity from opening.
I'm having the same issue. Created this PowerShell script to delete these files. https://github.com/nielsbosma/Scripts/blob/main/DeleteNul.ps1
I have a same issue.
After using Claude Code, The unknown 'nul' file was created and it can't be deleted.
My OS is Windows.
It guess the claude code affect file system of windows and sometimes it creates trash file.
It is fatal issue because I can't controll git of the project any more.
Just run the PS script from higher in the comments. Also you can save it in the project folder then ask Claude to run it.
same issue here, very annoying.
Also experiencing this issue and is super annoying. Can't Claude just get this sorted out?
https://github.com/anthropics/claude-code/issues/4928#issuecomment-3517676629
same issue.
if you have trouble deleting the nul file, open the directory with git bash and type
rm nulrequires no administrator privileges
yeah, super annoying :(
Same issue, very annoying, I use this in command prompt:
DEL "\\.\C:\PATH-TO-NUL-FILE"
and it actually deletes it. Have it as a quick script i double click on my desktop.
To temporarily fix this, open the Git Bash on Windows, type
mv nul nul.json, and thenrm nul.jsonto delete the file.also having this problem
same issue, is ai breadcrumbing itself in the form of a bug?
same issue, please solve.
Note: on windows you can remove by opening the folder in git bash, and then run
rm nulIn VSC it is possible delete those files via the folder view, but still annoying.
Same annoying issue
still a thing apparently.
still a thing apparently.
Still a thing, it generated one for me just today
Please get this fixed; it is happening a lot on Windows. I have had to write a background app that monitors my drives and deletes the nul files, but this is not a great solution.
Even after deleting, it's coming back for me within second
Still a problem more than four months later
Same issue for me. This is really annoying. Can we please get this addressed?
<img width="470" height="278" alt="Image" src="https://github.com/user-attachments/assets/8377300a-f687-4a5e-abb0-aa117eda2c3d" />
I got the same issue
I wouldn't expect a quick fix for this because it would likely require fine tuning the model. Maybe they have tools that can change behavior in some other way, maybe not.
In the meantime the models respond fairly well to instructions (for example in claude.md) like:
Windows: use
2>/dev/nullnot2>nul(causes bash to create literal file)You might still have problems later in the context but for the most part that solves it
Can't they just build this directly into Claude code so it removes these
files automatically / blocks the agent from writing them.
On Tue, 9 Dec 2025 at 14:43, designbyian @.***> wrote:
workaround:
.claude/hooks/windows-nul-fix.js.claude/settings.jsonI'm having the same issue.
also experiencing the same on 2.0.62 for the past couple days. using vsc or git bash in the repo dir seems to be the best way to remove it; still super tedious though
Experiencing in v2.0.65 still
I have the same issue, it keeps creating it
Perhaps we could stipulate in CLAUDE.md that it should execute commands using pwsh or cmd? (I haven't tried it yet, so I don't know if it works)
This is still an issue in 2.0.70.
This is a general issue with how Claude (sometimes) generates
Bash(...)tool uses on Windows. It will mix up Bash andcmdsyntax. For example, it will generateThere are at least two issues with this:
\) as path separator in Bash2>nulfor stderr output redirection in Bash (instead of/dev/null)Can confirm this issue remains unresolved in v2.0.71.
The "nul" file creation occurs with:
Same, created by /init in a mostly empty new project on Windows
This is a very stupid bug.
Still an issue in 2.0.71
Still an issue in 2.0.75
Just to emphasize how annoying this is, while deleting these
nulfiles can be worked around by using a UNC path as described above - if it somehow ends up in your git index or staging area, you can't checkout a different commit, stash, rebase, not evengit reset --hard HEAD^.I ended up setting up WSL and firing up a container to fix up my git local state.
@zsol You can actually run
rm nulin git bash to delete this file.I had the same issue. Vibe fix:
<img width="343" height="213" alt="Image" src="https://github.com/user-attachments/assets/e50c59ee-69fd-4ca7-b6ee-2bfe95e8cf5e" />
Issue persists on 2.0.76. However, @hydropix 's Python script fixed it. Appreciated!
I'm still getting a nul file created.
shift delete helped me delete the file finally
edit: it deletes but gets immediately recreated
same issue here. Version 2.0.76 (Claude Code)
Bug still happening!!
I had this nul file created 3-4 times in the past week.
Working with the latest Claude Code as an extension in VS Code.
I'm pretty sure this time it was created here:
It's hard to delete, but this does the trick-
Open Powershell as admin.
Is there a configuration or something to prevent it from coming back ?
Not that I know of
still a problem in version of today, it is a silly bug.
claude code in vs code:
2.0.75
Yes, claude should stop create reserved names. see https://github.com/anthropics/claude-code/issues/16604
I've lost track how many times I've deleted this nul file. (Shift + Delete)
This issue still exists. I'm using Claude Code in terminal on Windows 11.
I had to use the below command to delete it:
del "\\?\X:\path-to\actual-file\NUL"thanks god,Shift + Delete is true
This is rapidly becoming incredibly annoying. It causes things like generation of automatic commit comments (e.g. VS Co-pilot) to fail as it stumbles across these files. I have been using WSL (with "rm null") to get rid of them but they appear continuously and it's now beyond a joke.
I have delete this thing at least 20 times per week since it breaks Unity... How is silly bug like this from August still around? Thank you people above for mentioning Shift - Delete, I've probably lost hours trying to remember cmd line commands that can actually delete this thing.
We are getting this also.
no fix since Aug 1, 2025 , and now also these:
<img width="600" height="368" alt="Image" src="https://github.com/user-attachments/assets/697e1138-44c5-4c07-aa2e-9c994ecf16db" />
I'm seeing the same behavior, but Shift + Delete is a workaround that worked for me, thank you!
+1 (possibly, if this has not been fixed by the fix for tmpclaude files)
In my experience shift+delete won’t raise an error and the file will disappear from the list in explorer while you have it open, but if you leave the folder and then go back into it the nul file will still be there. I found several methods for deleting the nul file on google, most of which did not work. The one that worked for me was cmd as admin using the del command with the \\\\?\\ syntax that allows you to delete files with protected names.
Still an issue, an a really annoying one.
Same
Yes, it is indeed annoying. Of course, if you prefer to use a terminal like Git Bash or WSL, you can also remove it using the simple
rmcommand.Here are some related issues that have cropped up since the recent Claude Code - v2.1.2
https://github.com/anthropics/claude-code/issues/18059
https://github.com/anthropics/claude-code/issues/18052
https://github.com/anthropics/claude-code/issues/18052
https://github.com/anthropics/claude-code/issues/18036
https://github.com/anthropics/claude-code/issues/18017
https://github.com/anthropics/claude-code/issues/18012
https://github.com/anthropics/claude-code/issues/17994
https://github.com/anthropics/claude-code/issues/17983
plus about 50 more
Still happening on Windows 11 + Git Bash with Claude Code v2.1.7.
Empty
nulfile (0 bytes) created in the working directory alongside thetmpclaude-*-cwdtemp files.got way worse with the tmpclaude-*-cwd files
Having the same issues with 'nul' file creation and 'tmpclaude' files being generated.
None of the workarounds to delete the 'nul' files would work for me but I found this to work for anyone having the same issue...
still the case
Same issue. Any work around?
Ugh. All my .gitignores have 'nul' at the bottom...
Shift + Delete deleted it, then it re-appears? It is impossible to get rid of this file. I guess add
nulto your .gitignore files.I can confirm this worked for me on Windows 11
I am also reproducing this.
Claude Code v2.1.12
Also having issues with this.
The issue is still here....
@Blake-Madden Thank you for the workaround!
I was able to prevent
nulfiles from being generated by adding the following to my.bashrc(usually located at~/.bashrc):Alternatively, in cmd:
rename \\.\C:\<PATH_TO_FILE>\NUL. delete.txtdel delete.txtfix it with PowerShell:
Needless to say, the issue is still there. Some attempts to add instruction to avoid this in Claude.md results in many more errors in command line, and claude ends up redoing what it knows, which leads to this
nulfile creation again. Please provide guidance / training for this, this a huge productivity and confidence hit in the tool for the team (need to explain, need to share the command to remove file, raise questions, etc...).It's a bit like getting a good car to change your old motorcycle, but with the drawback that you have to stop the car every 5 min to recover something that was thrown down the road. The product makes us go faster, but the annoyance may be getting on our nerves enough to stop using it.
Because this runs before every command, it adds overhead. 🥲
Claude Code just needs to stop redirecting output to nul instead of /dev/null (for git bash) or $null (for pwsh)
i ask a cheap model to delete copied nul path :) for example: glm / minimax :)
Just use a hook that prevents it from happening, the output will also inform Claude to refrain:
*Edit: Don't bother correcting Claude, just fix bad tools calls directly: https://github.com/anthropics/claude-code/issues/4928#issuecomment-3848600448
This bug causes massive issues with Windows as a whole. I get BSODs periodically because of this, as well as instances of not being able to even open the directory with my IDE because of its existence.
In my case, I managed to delete the nul files generated by Claude Code by opening the project in VS Code. While deleting them directly through the OS didn't work, I could see the failed command logs inside the files when opened in the editor. From there, I was able to delete them instantly using the Delete key (or the GUI).
Exactly same, I don't know whom to blame, the RAMs or the claude code
Yep having same issue. Using claude for unity coding help. This file corrupted my whole project and i couldn't find out why its suddenly broken until i've seen the nul file wich is recreated after removal.
This makes unity loop import and then breaks the import process. This needs to be fixed.
Ultimately what it boils down to is Claude Code doesn't really understand Windows. The nul file is only one example - several times a day, Claude has to go through several iterations of command line execution to do things on Windows, and it tries layering cmd + PowerShell + bash, and always messes up quotes, command separators, etc. The Windows implementation needs a lot of work.
The bug is still in version 2.1.29
Small indie company that can be trusted with billions of dollars that can't even fix a bug reported half a year ago
Bug-fixing AI, get on this immediately. The point isn't how to delete 'nul' files. The problem is that Claude Code is spawning them constantly in the Windows environment.
They don't care about windows. Target is Apple Vibe Coders and businesses that use apple. That's also why cowork only exists for mac. Just switch to Copilot CLI or Opencode if you are on windows. Sad but that's how it is right now.
The degradation of their models don't make it even worth it anymore anyway: https://marginlab.ai/trackers/claude-code/
Other problems on windows not getting attention: https://github.com/anthropics/claude-code/issues/5049
still happening
@kmgallahan on Windows a capital NUL also works fine,
command > NULClaude Code needs to be instructed to use only capital NUL. This should work in git-bash as well.
@n4tt0u you must rename it first:
rename \\.\C:\..\NUL. deletefile.txt(note the dot after NUL!).then just delete it
del deletefile.txtI don't know what all the hullabaloo is...
I just click it and hit delete and then confirm the delete. And, if you put it in your gitignore, it get's ignored.
I doesn't always work to delete it from the explorer or from VSCode. Personnaly I just ask claude code to delete it and it work
@Florian-Thake I don't bother correcting Claude anymore via the previous script, it is a waste of time/context.
Instead I just fix a variety of Windows issues by modifying the tool calls directly:
*Note: the
pwshcall is just to ensure powershell 7 is used instead of 5 on my system.``` json
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python C:/Users/*/.claude/hooks/bash-syntax-corrector.py"
}
]
}
]
},
Same issue here. I couldn’t delete the nul file either.
I was finally able to remove it using WSL. Simply running
rm nulworked — no sudo required and no error messages.Ran into this just now, used WinRar to archive + 'delete file after' to get rid of it.
Quirk: Claude Code Creates
nulFiles on Windows/dev/nullredirection which Windows interprets as creating a literal file namednul. These files blockrmdirand cause "Access denied" errors. Standard deletion methods (del,Remove-Item,Test-Path) fail because Windows intercepts the reserved name.[System.IO.File]::Delete("\\?\C:\full\path\nul"). Alternative: WSLrm, 7-Zip archive+delete, or rename trickren \\.\path\NUL. temp.txt.---
Quirk: Glob Tool Reports Phantom
nulFiles on Windows**/nulor**/NULmatches Windows reserved device names in every directory, reporting them as if they were real files. This causes false positives - Claude may dismiss realnulfiles as "phantoms" when diagnostic tools likeTest-Pathalso fail to find them.nulfile detection. Confirm actual files via build script errors ("Access denied" fornul) or directory listing. If something says "Access denied" fornul, the file IS real.@kmgallahan Thank you for providing this detailed script! Yes, better use some more CPU time as to waste tokens/reasoning and context.
But still, its a shame that such amount of workaround scripting code is needed at all - for easy tasks like invoking a shell script.
We ran into the same issue on Windows.
Claude created a file/folder named
nulinside the repo.This cannot be deleted via Explorer, CMD, PowerShell, \\?\ paths,
robocopy, git clean, or even by asking Claude itself to delete it.
The ONLY thing that worked was opening Git Bash in the repo folder and running:
-- rm nul
Git Bash (POSIX layer) bypasses Windows reserved device-name handling,
while Win32 APIs refuse to touch
NUL.You can delete
nulfiles by opening VS Code, locate it, then pressShift + delete. It will automatically delete it.The hullabaloo is about something happening when it shouldn't. The suggestion is appreciated but don't trivialize the issue that needs to be addressed.
That be said, I followed your suggestion and added it to
.gitignore, but all that does is just mask the problem, not resolve it.I’m seeing this as well on Windows.
Claude Code version: 2.1.37
Behavior: a literal file named nul appears in the working directory as soon as Claude performs file operations (create/update/delete files).
Impact: any folder containing this nul entry becomes painful/near-impossible to delete with normal PowerShell rm/Remove-Item (needs \\?\ path prefix workarounds), and it pollutes multiple project folders quickly.
This happens consistently for me after the first set of file writes/edits in a directory
Another concern is that Claude starts repeatedly trying to delete rm "/nul" in different ways which has the potential of running incorrectly and removing a lot more than intended.
Yeah same on windows here, using Remove-Item -LiteralPath now with \\\\?\ path, this works, but it is still cumbersome to do this the whole time.
Remove-Item -LiteralPath "\\?\C:\repos\nul"+1 — Still happening on Windows 10 (26200.7623). Found 4 nul files scattered across subdirectories after a session. Had to use Python with \?\ extended path syntax to delete them since they can't be removed normally.
Nice idea! Couldn't delete normally or add a prefix, etc, this did the trick through.
Same here, on Windows 11
Back to Claude Code on WSL
Tip: delete it from WSL and add it to your .gitignore until we have a fix.
I asked claude to explore this issue, he told me:
Root Cause Analysis:
nulFile Creation on WindowsThe Core Issue: Windows 11 24H2 Behavior Change
Windows 11 24H2 (build 26100+) removed the legacy restriction on reserved device names (
NUL,CON,PRN, etc.). This is a breaking change from decades of Windows behavior:| Operation | Windows 10 & earlier | Windows 11 24H2+ |
| :--- | :--- | :--- |
|
fs.openSync('nul', 'w')| Opens NUL device (data discarded) | Creates a real file named nul ||
fs.openSync('\\\\.\\nul', 'w')| Opens NUL device | Opens NUL device (still works) ||
fs.openSync(os.devNull, 'w')| Opens NUL device | Opens NUL device (still works) |Verified on Windows 11 build 26200:
---
Where It Happens in Claude Code
Claude Code is compiled as a Bun binary. Somewhere in the Bun runtime or Claude Code's bundled
cli.js, barenulis being used as a file path instead of\\.\nul(i.e.,os.devNull). This likely occurs in:child_processimplementation — when spawning subprocesses, the runtime needs to redirect ignored streams to the null device.ripgrep.node) output handling — the Glob tool triggers this frequently.The code worked on older Windows because the OS itself intercepted any access to
nuland routed it to the NUL device. On Windows 11 24H2, that safety net is gone.---
Fix
All occurrences of bare
nulused as a file path must be replaced withos.devNull(\\.\nul), which is the UNC device path that correctly addresses the NUL device on all Windows versions. This may require fixes in both:cli.jsbundle)child_processor stdio internals)---
References
Makes no sense that Windows 11 allows the creation now... but not the deletion via explorer 😣
We've made some adjustments in Claude Code 2.1.42 - let us know if this is still occurring
I solved the issue of committing to git by adding the file
nulto the .gitignoreThat will still leave the actual file there...
The issue is still occurring in v2.1.45
no significant change noticed. nul files still getting quickly created yesterday & today at root folder and in some subfolders depending on the mood of the tools.
I wrote a PreToolUse hook to prevent nul, and other reserverd file names creation.
Also fixes up the constant windows path mangling as Claude just keeps messing up forward, backwards slash and (argument) escaping under Windows. Also takes care of using
$in eg PowerShell oneliners.Feel free to give it a go: https://github.com/rweijnen/claude-hooks
Why still this not fixed?
confirmed still not working; i would like some way to delete the file, if possible also.
Seems the only way to remove it is by deleting
.claudefolder in same folder asnul. WIthout deleting it, the file keep appearingI did all that only folder and nul file inside, tried everything it comes right back after force deleting, I removed WSL, docker desktop, and it still keeps popping up.
For all who still have problems to delete
nul.From Windows cmd just issue
rename \\.\C:\..\NUL. deletefile.txt(note the dot after NUL!).then just delete it
del deletefile.txtFrom git-bash a simple
rmshould do the job as well.If you don't want to create a hook for claude code to prevent this to happen, the global CLAUDE.md is a good place to prevent
nulfiles to be created:i used del "\\?\C:\Users\michael\Desktop\nul*" to get this to work, finally done with this annoying problem. win 11, whatever current is for the release.
Thanks!
Thank you
I hope to remember to test this but I've already moved everything into Linux containers now. I will see what happens when I make scripts on windows without using any hooks and if it happens again I will drop a comment.
That's noise. Not a solution.
This is still an issue I have had to create a hook to defend against this
Claude Code v2.1.59
One of my errors:
Bash(cd
/c/Users/JaieChamsoft/.claude/extensions/AIDLC-Web && cat ../../aidlc/intents/aidlc-dashboard-ui/units/UNIT-002-core-views/BOLT-CX1-STATE.md 2>/dev/null | he…)
⎿ Error: PreToolUse:Bash hook error: [$USERPROFILE/.claude/hooks/aidlc-host-publish/Aidlc.Host.exe validate]: Redirect to /dev/null blocked - let errors display
Still having the same issue on my windows system with the latest version of claude code/vs code
Still having the same issue. On windows you can simply delete it with a wsl terminal or gitbash. Just
rm -f nulin the project dir. Still not fixed is crazy.@bcherny I couldn't find anything specific in the release notes regarding a fix for nul file creation so I'm wondering why you closed the issue?
@bcherny please when closing issues, release the change first, publish the changelog linking from the changelog to the issue, and also consider posting a comment into the issue to inform the issue subscribers.
This type of process was tried in https://github.com/anthropics/claude-code/issues/17600#issuecomment-3912518825 and the changelog for 2.1.45 and 2.1.47 includes links to issues https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2147.
Hello why is this closed? Still generating 'NUL' file on 2.1.63
I came here because I experienced this same issue using claude sonnet 4.6. Why is this closed?
If you can't differentiate between a model number version and actual software version. Please just uninstall.
Sorry not a helpful solution. 🙄
Sorry. You're making noise. Pointless. Read more comment less.
!image
I think you need a lot of help from real experts here. Your website security rating is F or if it could go lower it would.
Stop faking it!
Let's please keep the focus on the issue.
Well you pretty much solved it. Thank you again.
The
-NoProfileis a nice addition, I've added this to my claude code hooks collection: https://github.com/rweijnen/claude-hooksThanks for sharing @kmgallahan
For me the
-NoProfilewould break things since I've set it up to load cached path variables containing the MSVC BuildTools Toolchain without slowing down the startup of pwsh. This way I dont need to load them withVsDevCmd.batthat is significantly slower.@rweijnen My hook has changed a bit as edge cases crop up: https://gist.github.com/kmgallahan/cf44f50293901c7d4034b21b52c5804f
In my hooks every fix can be disabled in the config.json individually - good to know, if this is a common it's perhaps best to make it off by default (but so far you're the first/only)
For anyone still struggling with undeletable folders caused by
nulfiles, I made a small tool called nonul that might help.It replaces the folder "Delete" option in the Windows Explorer right-click context menu so that it can handle
nulfiles automatically. Once installed, right-click Delete just works — even on folders containingnulfiles. Supports both one-liner install and Scoop.Hope it helps! If you find it useful, a star on the repo would be much appreciated :)
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.