-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Labels
workspaceFeedback for workspace management, layout, interactions, etcFeedback for workspace management, layout, interactions, etc
Description
Summary
Adding, removing, or renaming files and folders outside of Zed will not automatically update the project panel.
Description
When working with complex projects where files will change outside of Zed the Zed editor falls out of sync with the system state. Specifically, open buffers and the project panel, and the git panel. Likely anything inside of Zed that relies on a cache of the current filesystem state.
Steps to reproduce:
- Start with a deep folder structure
- Apps
- app1
- app2
- app3
- Packages
- package 1
- package 2
- protos
- service/v1/
- src
- package 3
- Have AI create some protos in
package2/protos/service/v1 - Open some of these protos in Zed
- Download some actual protos that replace some of those files
- Download some actual protos that add new protos to that folder
- Open a terminal and cd into the directory to verify they are there
- Notice the open buffer did not update
- Notice the project file list did not update
Expected Behavior:
- Open buffers should update when files are replaced on the system.
- Project folder structure should be in sync when making changes outside of Zed
- Git panel should always show the current state as if one typed git status in their terminal.
Actual Behavior:
- Open buffers display the previous version of the file downloaded.
- Git panel is completely ignorant of any changes even after doing
git add . - Project panel still show the old state
Errors
LSP Failed to load workspaces. (click to expand)
2025-09-12T22:07:22-07:00 INFO [project.lsp_format] Formatting via LSP
2025-09-12T22:07:22-07:00 ERROR [project::lsp_store] Formatting failed: failed to format via language server: Failed to spawn cd "/Code/packages/rust/services" && "rustfmt"
2025-09-12T22:07:22-07:00 ERROR [acp_thread] failed to format via language server
Caused by:
Failed to spawn cd "/Code/packages/rust/services" && "rustfmt"
2025-09-12T22:07:37-07:00 INFO [project.lsp_format] Formatting via LSP
2025-09-12T22:07:37-07:00 ERROR [project::lsp_store] Formatting failed: failed to format via language server: Failed to spawn cd "/Code/packages/rust/services/src/openfga" && "rustfmt"
2025-09-12T22:07:37-07:00 ERROR [acp_thread] failed to format via language server
Zed Version and System Specs
Zed: v0.202.8 (Zed)
OS: Linux Wayland bluefin 42
Memory: 125.6 GiB
Architecture: x86_64
GPU: AMD Radeon RX 7900 XTX (RADV NAVI31) || radv || Mesa 25.1.7
binarypie, menelike, thinkbig1979, ivan-aksamentov, psychedelicious and 23 more
Metadata
Metadata
Assignees
Labels
workspaceFeedback for workspace management, layout, interactions, etcFeedback for workspace management, layout, interactions, etc
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Open buffers and project panel out of sync when changes are made outsdie of zed[/-][+]Zed out of sync with changes made outside of editor[/+]binarypie commentedon Sep 15, 2025
An interesting note to this behavior. I'm not seeing the system fall out of sync when running in a container. So your typically devcontainer workflow works great.
That does basically disable the majority of the good AI tooling. So for now I'm running a combination of Auggie (Augment Code) and Gemini (Google) through their CLI.
Doesn't look as nice in the UI but we get the job done without issue.
If anyone from Zed reads this. The ability to just run any CLI out of the container as an agent would be awesome. There are so many tools out there and most of them have TUI. Would be nice to not have the editor open files on top of the agents when you split your main screen.
psychedelicious commentedon Sep 16, 2025
This issue has started happening to me recently. I'm not sure when it started - maybe a week or two ago. The issue is intermittent with no clear pattern or repro.
Example scenarios:
If I recall correctly, once the issue starts happening, it doesn't stop until I reload the window. So maybe there is something going on w/
inotifyor whatever watches the filesystem.I use zed via remote dev. The remote host is Linux; the local client is macOS.
Zed: v0.204.1 (Zed Preview)
OS: macOS 14.3
Memory: 32 GiB
Architecture: aarch64
binarypie commentedon Sep 22, 2025
Another update here. Developing inside a remote/container is having the same effect. None of my open buffers update when files are changes via the CLI. The project tree has also stopped updating.
psychedelicious commentedon Sep 22, 2025
I noticed something today that seems like it could be related. After switching branches, an open file synced correctly. I see the correct content in the buffer. But the LSP (
basedpyrightin this case) seems to be using the file contents from before switching branches.Screen.Recording.2025-09-22.at.3.36.53.pm.mov
Note how there are warnings/errors in whitespace and for parts of symbols. The LSP messages are nonsensical for the rendered buffer contents.
After stopping all LSP servers, the warnings/errors are still present, as if there are orphaned LSP servers. I feel like this started happening intermittently at the same time as the stale buffers but I chalked it up to wonky LSP and reloaded zed to fix.
binarypie commentedon Sep 23, 2025
I decided to take a look at my logs. The problem seems to happen when any LSP fails. So for example I do not have terraform installed but I do have tofu installed. However, if I open a TF file to change something then the whole editor loses lsp connection and refuses to work until refreshed.
Caused by: Terraform (CLI) is required. Please install Terraform or make it available in $PATH 2025-09-21T18:19:09-07:00 WARN [project::lsp_store] Get hover via terraform-ls failed: main.tf (224,3): unknown attribute "restart" 2025-09-21T18:19:09-07:00 ERROR [project] Get hover via terraform-ls failed: main.tf (224,3): unknown attribute "restart" 2025-09-21T18:19:10-07:00 WARN [project::lsp_store] Get definition via terraform-ls failed: no reference origin found 2025-09-21T18:19:10-07:00 ERROR [project] Get definition via terraform-ls failed: no reference origin found 2025-09-21T18:19:11-07:00 INFO [project.lsp_format] Formatting via LSP 2025-09-21T18:19:11-07:00 ERROR [project::lsp_store] Formatting failed: failed to format via language server: Terraform (CLI) is required. Please install Terraform or make it available in $PATH 2025-09-21T18:19:11-07:00 ERROR [editor] failed to format via language serverpsychedelicious commentedon Sep 23, 2025
@binarypie How are you getting those logs?
I remembered another oddity that has been occurring for me in the same timeframe, that may support the issue being related to LSP failing.
Sometimes, I use
Find All Referenceson a symbol, but it doesn't work (nothing happens). After a few attempts it works, and I move on with my work.A while later - many seconds to a couple minutes later - the
Find All Referencesresults window for that symbol randomly open up, without me having used that LSP feature. It's as if the first failedFind All Referenceswas queued somewhere in the background and took a while to be executed.binarypie commentedon Sep 23, 2025
@psychedelicious you can run
zed: open logfrom the execute command shortcut (ctrl+shift+p)xsoheilalizadeh commentedon Sep 24, 2025
I have this issue when AI agent from terminal edits the workspace, this is not limited to the file explorer also the git windows is out of sync, I have to restart zed every time.
binarypie commentedon Sep 24, 2025
@xsoheilalizadeh next time this happens open the logs and if anything has crashed can you paste them here?
18 remaining items
binarypie commentedon Oct 29, 2025
I'm running Zed connected to a remote with no symlinks in the main folder and building rust applications. Main /src files will just not exist or stop being updated even when closing and opening the buffer.
ActuallyHappening commentedon Nov 1, 2025
Getting out of sync fs bugs all the time, reloading doesn't fix the issue
Akiyamka commentedon Nov 6, 2025
Nothing special needed for reproduce this. No crashing LSP, symlinks, monorepos etc.
Steps to reproduce:
Expected Behavior:
Actual Behavior:
notify: Bump to rebased 8.2.0 fork (#42113)
notify: Bump to rebased 8.2.0 fork (#42113)
notify: Bump to rebased 8.2.0 fork (#42113)
notify: Bump to rebased 8.2.0 fork (zed-industries#42113)
olejorgenb commentedon Nov 9, 2025
Another duplicate I think: #15791