AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 27, 2026, 10:01 JST

Claude Code on Windows: APPSET~1.JSO write deletes real file

Send on LINE
Claude Code on Windows: APPSET~1.JSO write deletes real file

3 Key Points

  1. What happened

    Testing Claude Code 2.1.330 on Windows 11 on 2026年11月24日, the author's Write to APPSET~1.JSO in bypassPermissions mode erased app.settings.json and left a file named APPSET~1.JSO; an Edit on CREDEN~1.JSO likewise replaced credentials.json.

  2. Why it matters

    Contents are rewritten correctly, so nothing looks wrong, but config loader that reads app.settings.json by name now finds no file, and a .gitignore entry for credentials.json does not stop CREDEN~1.JSO from being committed.

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 report builds on issue #110153 in the official repository, which described the behavior on version 2.1.325; the author re-checked it on a personal machine running 2.1.330. The failure is quiet by design: because the file contents are rewritten correctly, the tool returns an ordinary success response and never mentions the rename, so the damage only surfaces later when something reads the file by its original name.

The author's working theory is that Claude rarely invents short names on its own. Rather, it picks them up when it reads dir /x output or old scripts and logs written with short names, then reuses that name verbatim. That points to the risk arising from the context Claude is fed, not from the request itself.

The recommended guards are two: confine bypassPermissions — the mode the official Permissions documentation says should be used only in disposable containers or VMs — to throwaway environments, and add a PreToolUse hook that rejects filenames matching ~ followed by digits. The author notes the hook must be invoked with -File, since calling it with -Command turns refusal exit code 2 into 1 and the block fails unless onFailure is set.

FAQ
Does this happen in normal permission mode?
No. In acceptEdits running via claude -p, both writing to and reading the short name stopped and nothing was written, because the issue says short-name paths are treated as requiring manual approval.
Which Windows files are at risk?
Files that carry a short name like APPSET~1.JSO, which appears next to the long name in dir /x output. Old files may still have one even if the drive no longer creates short names for new files.
Does the suggested hook block anything else?
Yes. It blocks any filename containing ~ plus digits, so a legitimate long name such as report~1.txt would also be stopped. It only checks the filename, not short folder names.
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 articleTrustedRouter hits 6 billion tokens a day with encrypted AI routing