openFile: nested write + BufWriteCmd handler can overwrite Claude's file during the acwrite step (known gap)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 12/100
Hướng nghiên cứu
Start with the openFile paragraph of Side Effects in lua/claudecode/tools/README.md, then read earlier threads #408, #413 and #420 for the attempts already ruled out. The hard part is design: find a way to block writes of only the one buffer during the acwrite step without affecting other writes or prompts. Done means a documented, tested approach that keeps the E676 and E142 behaviour the issue describes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
openFile can still write the user's unsaved text over the file Claude just changed, in one narrow case. This issue tracks it, because #413 and #420 only documented it.
When it happens. All three must hold:
- openFile runs its acwrite step for the buffer: the buffer was opened before its file existed, or 'eventignore' or 'eventignorewin' ignores FileChangedShell.
- A user autocommand with
++nestedon BufEnter, BufWinEnter or BufLeave writes that buffer while openFile shows it. - A user BufWriteCmd handler that matches the file (such as
BufWriteCmd *) writes<afile>.
Without ++nested, or without a matching handler, the write fails with E676 and Claude's file stays. Before #408, Neovim stopped this write with E13.
What was tried.
- Turning the global
'write'option off during the step (#413 first version) stopped the overwrite but made a commonautocmd BufLeave * updateautosave fail openFile with E142. nowriteornofile'buftype' make 'modified' read as off, which loses unsaved text through other autocommands (#408 round 7).readonlydoes not stop:w!and prompts with 'confirm'.- A BufWriteCmd guard of openFile's own runs after the user's
BufWriteCmd *.
Where it is documented. lua/claudecode/tools/README.md, openFile paragraph of Side Effects.
A fix needs a way to block writes of this one buffer during the step without blocking or prompting other writes.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Ngôn ngữ chính
- Lua
- Star
- 3.1k
- Fork
- 223
- Merge trung bình
- 6 giờ 47 phút
- Pull request đã merge (30 ngày)
- 93
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/claudecode.nvim
-
[BUG] ClaudeCodeAdd fails on paths with spacesCó thể đã có người làm @7A1T đã nhận 80 ngày trước. Đang mởbug needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
coder/claudecode.nvim#314 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
coder/claudecode.nvim#313 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
coder/claudecode.nvim#434 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] ClaudeCodeSend leaves source buffer in insert mode (snacks provider, focus_after_send off)Đang mởneeds-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
coder/claudecode.nvim#423 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
coder/claudecode.nvim#309 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của coder/claudecode.nvim
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rohit746/pdf-view.nvim#107 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug guide
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement forever
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
openmap-world/openmap#78 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AndyHazz/bookends.koplugin#130 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
carlos-algms/agentic.nvim#336 ·