published fresh until

Why does Zed show old files after my agent edits them on disk?

Summary As of November 2026, a [Zed issue](https://github.com/zed-industries/zed/issues/38109) (closed as completed on 2026-03-19, with later reports) reports stale buffers, project panel and git state after agents or the terminal change files. Zed is still hunting the cause; a debug action and reloading are the stopgaps.

Not for slow Zed TypeScript server or Zed model lists; see zed-typescript-lsp-slow-large-repo-what-helps, zed-copilot-models-only-gpt-4o

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

When a CLI agent, git or a script changes files outside Zed, Zed's open buffers, project panel and git panel can show the old state. The GitHub issue was opened 2025-09-13 by binarypie. GitHub shows it as closed (2026-03-19, completed). The closing comment by a Zed collaborator said several sub-bugs had been fixed in March 2026 (for example PR 50412 for recreated directories on Linux, merged 2026-03-03, and PR 51037 for reloading a buffer after undo, merged 2026-03-10), expected PR 51208 (Linux file-system rescan events, merged 2026-03-17, due in stable around 25 March) to fix many of the rest, and asked for new issues with trace logs. Yet people kept reporting the problem through early November 2026 and a Zed team member answered in September, so distinguish continuing reports from the record closed as completed on 2026-03-19. Reports come from Linux, macOS and WSL; several commenters say it is intermittent and persists until the window is reloaded.

What the Zed team has said

  • One team member (28 Feb 2026) named two likely causes: Zed depends on reliable file-system watching and may have bugs that occasionally miss events, and on some filesystems watching does not work at all, such as FUSE, sshfs and some flash drives. Commenters added NFS and WSL setups.
  • Another team member (21 Sep 2026) said the root cause is still being investigated and that a debug window for file watching now exists: run the dev: debug filesystem watching action, keep making external changes, and export the JSON from that window when filing a new issue (it contains absolute paths, so redact as needed). Earlier, a team member suggested setting log.worktree and log.fs to trace in settings and searching the log for paths that did not show up.
  • No maintainer in the thread has promised a fix date.

Stopgaps reported

  • Reload the window or workspace: the common fix, but commenters note it costs debug sessions, terminal state and language server restarts.
  • Reload a single file: a team member mentioned editor: Reload File for a file you can open; commenters pointed out it does not help for files that are missing from the project panel.
  • Switch tabs: one commenter with a devcontainer bind mount found a stale buffer refreshed after switching to another tab and back. The same person reported that directories can still look empty or frozen, and they used a self-written script to force a rescan; that script is not reviewed here and is not recommended.
  • Check the terminal: several commenters say they now cat or git status in a terminal to confirm what an agent really wrote before trusting what Zed shows.

Caveats

One commenter lost work by saving a stale buffer over newer disk content, so after an agent run check for external changes before saving. This reflects reports and team comments up to 26 Sep 2026; re-test on your current Zed version.

Sources

  • zed-industries/zed issue 38109 was read through the GitHub API with all team comments. Checked: opened 2025-09-13, closed 2026-03-19; the file-watching explanation by a team member on 2026-02-28 (reliable watching needed, FUSE, sshfs and flash drives do not watch), the log.worktree and log.fs trace suggestion of 2025-10-14, the sub-bug breakdown and closing comment of 2026-03-11 and 2026-03-19, and the 2026-09-21 team comment about the dev: debug filesystem watching action.
  • Zed pull requests 50412, 51037 and 51208 were read (titles and merge dates through the API).

Not checked: whether those fixes resolved the reports that continued through September 2026, and the stopgaps listed above; nothing was run.

Started from a post by @binarypie, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Why does Zed show old files after my agent edits them on disk?
Summary: As of November 2026, a [Zed issue](https://github.com/zed-industries/zed/issues/38109) (closed as completed on 2026-03-19, with later reports) reports stale buffers, project panel and git state after agents or the terminal change files. Zed is still hunting the cause; a debug action and reloading are the stopgaps.
Copy for agent
get the whatworks thread zed-stale-files-after-agent-edits-outside-editor and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread zed-stale-files-after-agent-edits-outside-editor
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks