You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: apply_patch waits for LSPs sequentially causing big multi-file patches to hang #10965
When apply_patch modifies multiple files, it waits for LSP diagnostics sequentially - up to 3 seconds per file. Patching 20 files can block for 60 seconds.
Create 20 TypeScript files at the same time using bash:
- test-perf/utils1.ts through test-perf/utils20.ts
- Each exports: export function util1() { return 1 }
Then use the apply_patch tool (not sed, not individual edits) to add "// patched" as line 1 to ALL 20 files in a single patch.
After the patch tool returns, immediately say "PATCH COMPLETE" so I can time it.
watch it hang on ~ Preparing apply_patch... for 60 seconds
changed the title [-]apply_patch waits for LSPs sequentially causing big multi-file patches to hang[/-][+]bug: apply_patch waits for LSPs sequentially causing big multi-file patches to hang[/+]on Jan 28, 2026
I'm also seeing hanging for apply_patch but even when I am only editing 1 file. Hangs for many minutes until I eventually interrupt it. I can see that my API request has completed with output tokens by looking in the Zen dashboard (screenshot attached).
Maybe this warrants it's own issue given it's not related to multi-file updates. Though the update was quite a big one based on the number of output tokens.
Also, I interrupted then used /timeline to go back to the prompt and rerun it and the same outcome. Then I interrupted and just told the model to continue, which also resulted in it hanging again. So it seemed like a repeatable issue.
Okay, so this was a dumb issue on my part (but also a very unclear UX that could be improved). Turns out I had added a directory to my .gitignore between prompts and then when it tried to write to the file that was now gitignored it caused the whole thing to hang indefinitely. Problem resolved when I removed the directory from the gitignore.
Definitely unrelated to this issue but going to leave it here in case anyone happens across it in the future and might find it useful.
Activity
github-actions commentedon Jan 28, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
[-]apply_patch waits for LSPs sequentially causing big multi-file patches to hang[/-][+]bug: apply_patch waits for LSPs sequentially causing big multi-file patches to hang[/+]rian-dolphin commentedon Feb 4, 2026
I'm also seeing hanging for
apply_patchbut even when I am only editing 1 file. Hangs for many minutes until I eventually interrupt it. I can see that my API request has completed with output tokens by looking in the Zen dashboard (screenshot attached).Maybe this warrants it's own issue given it's not related to multi-file updates. Though the update was quite a big one based on the number of output tokens.
Also, I interrupted then used /timeline to go back to the prompt and rerun it and the same outcome. Then I interrupted and just told the model to continue, which also resulted in it hanging again. So it seemed like a repeatable issue.
rian-dolphin commentedon Feb 4, 2026
Okay, so this was a dumb issue on my part (but also a very unclear UX that could be improved). Turns out I had added a directory to my
.gitignorebetween prompts and then when it tried to write to the file that was now gitignored it caused the whole thing to hang indefinitely. Problem resolved when I removed the directory from the gitignore.Definitely unrelated to this issue but going to leave it here in case anyone happens across it in the future and might find it useful.
github-actions commentedon Apr 6, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.