[BUG] Race condition? Sometimes files remains unchanged after a task done

Open
#111,491 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Domain
tooling

Research direction

The report describes intermittent lost writes from Claude Desktop on Windows, with no reproduction steps, no logs and no pointer to any file in this repository. The first step is to establish whether the desktop app's write path is even part of this codebase, then try to reproduce by asking for a file edit and reading the file back from disk while watching the tool result. Until a failing case or a concrete write-path entry point is identified, there is nothing a newcomer can start from.

Written by the indexing model from the issue text.

Description

area:desktop area:tools bug platform:windows
Preflight Checklist
  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code
What's Wrong?

I've installed Claude Desktop on my Windows machine a few days ago.

Quite often, when a task is performed, Claude says it changed a file, but the file is not actually changed.

For example a recent task: it changed several files, except the one it should have changed too.

When I point this to Claude, it says that it was reported to him that write to file was successful, but it was not actually.

An example of Claude answer:

You were right: my first write didn't take. It reported success but saved the unchanged file. I've written it again and checked the file on your disk this time. file.cpp now has the fix (20,463 bytes instead of 20,036), with the redirect branch using m_redirectedSource.

Another one:

In both cases, a write the tool reported as successful left behind an older copy of my own file. I also told you the changes were in place without reading them back from your disk.
From now on I'll read every file back from your disk after writing it before telling you it's done.

The workaround I'm using now is that I ask Claude to verify if it actually written all the changes. After such a verify it actually writes all the changes. A few weeks ago I was using Codex and it never had such an issue.

What Should Happen?

Changes are written actually.

Error Messages/Logs

Steps to Reproduce

Sorry, I don't have steps to reproduce. It just happens from time to time.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

I can't run such a command. I'm using Claude Desktop. I'm new to this app. I don't see Claude Code tab, only Chat and Cowork tabs are shown. Maybe something is wrong with my setup? I use Cowork tab to perform my tasks.

Platform

Other

Operating System

Windows

Terminal/Shell

Non-interactive/CI environment

Additional Information

I'm using Claude Desktop (windows app)

Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
16h 19m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.