[BUG] Cowork Edit tool silently fails to save changes to Obsidian vault files (Cowork desktop app)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Context
This bug is in Cowork mode of the Claude desktop app (not the Claude Code CLI). The Cowork file tools (Edit, Read, Write) use the same Claude Code platform.
Problem
In Cowork, the Edit tool reports successful edits for markdown files in an Obsidian vault, but changes do NOT actually persist to disk. Edits appear in Claude's virtual view for the remainder of the session but are reverted by external synchronization (likely Obsidian sync or OneDrive). The Write tool on new files works correctly. No error is surfaced.
Scope of data loss (this user)
Skill/Журнал решений.md(project decision log) — ~30 entries (records 49-74) written across previous sessions were silently lost. Physical file contains only records 1-48 plus fragment of 61.Skill/Текущий статус.md— edits this session (strengthened opening-ritual + "Evening 2026-04-23" log) not saved.Skill/Роли диспача.md— new section "Role labels in responses" not saved.книги/rules/R-NC-01.md— confidence markers expected in v2 not present.
Pattern
Editfails silently on pre-existing files under active Obsidian/OneDrive sync.Writeon newly-created files works (sync does not revert unknown files).bash grepafter Edit reveals content reverted within seconds.
Full report
Detailed reproduction, environment, workaround, and recommendations in Skill/anthropic_bug_report_2026-04-23.md in the affected vault (~8KB). Available on request from the reporting user.
Severity: High
Silent data loss is the worst failure mode. Users who don't manually verify every Edit through external tools (bash grep) will not detect it until they lose hours of work.
What Should Happen?
Edit tool should save changes durably to disk. Changes should persist across session boundaries and external sync events.
If external sync interferes, the tool should do one of:
- Use atomic-write semantics that sync cannot revert, OR
- After Edit, verify that
new_stringis present in the file and surface failure as an error instead of silent success, OR - Detect "file belongs to sync-active directory" (e.g.,
.obsidian/,.dropbox/, OneDrive marker) and warn user/Claude at session start.
At minimum: fail loudly, not silently.
Error Messages/Logs
No errors, no warnings. The core of the bug — Edit reports success silently while changes are reverted by external sync.
Verification via Cowork workspace bash after Edit:
$ wc -l /sessions/.../mnt/ewa/Skill/Журнал решений.md
282 lines
$ grep -c "РЕГРЕССИЯ СОХРАНЕНИЯ" /sessions/.../mnt/ewa/Skill/Журнал решений.md
0
$ grep -c "blind_v5_4.11" /sessions/.../mnt/ewa/Skill/Журнал решений.md
0
During the session, bash append via `cat addendum >> journal` showed content added — file grew from 221 to 282 lines. Yet `grep` for just-appended content returns 0 — content reverted by external sync within seconds.
Affected user's mod-time comparison on the same day shows `План.md` (Write-created) and `Журнал решений.md` (Edit-targeted) modified at different times, with Journal modifications visible at one moment then absent from grep the next — consistent with external sync overwrite race.
Steps to Reproduce
- Open Cowork in Claude desktop app on Windows 11.
- Select a folder on disk that is an Obsidian vault with active Obsidian sync (e.g.,
C:\Obsidian\<vault>\). The vault may also be in a OneDrive-synced path (possibly contributing). - Ask Claude to use
Edittool on an existing markdown file in the vault (200+ lines), e.g., add a new paragraph between existing lines of a decision log. - Edit tool returns "The file has been updated successfully".
- Immediately use the workspace bash to verify:
grep "<new text>" /path/to/file— new text is found (virtual view still matches). - Wait 10-60 seconds, or do any subsequent task.
- Re-run grep on the same
<new text>— new text is gone, file reverted to pre-edit state.
No error is surfaced. Claude sees the edited version in subsequent Read operations within the same session (virtual view stays), but external bash sees the reverted version.
Simpler repro from a fresh session: open a fresh Cowork window, point to the same vault, bash cat the file — the Edit'd content from the prior session is gone.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Cowork desktop app (not Claude Code CLI). Model: Claude Opus 4.7. Version of CLI not applicable — Cowork-specific deployment.
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Full technical report (in vault)
The reporting user maintains Skill/anthropic_bug_report_2026-04-23.md (~8KB, markdown) in the affected vault with the complete reproduction, environment, workaround, and recommended fixes. Available on request.
Key workaround (confirmed)
- Use
Writetool (full file overwrite) instead ofEdit(partial patch) where possible. - For large files where Write is impractical, create new companion files (
<name>_addendum.md,<name>_дополнение.md) — external sync does not revert unknown files. - Verify every edit with
bash grepimmediately after; do not trust the "Edit successful" message.
Recommended fix priority
- Critical: Verify-after-write on Edit tool. Re-read the file after Edit reports success; check
new_stringis present; surface failure as an error. - Important: Detect sync-active vault (presence of
.obsidian/,.git/, OneDrive markers) and warn Claude or user at session start. - Nice to have: Transactional edit queue that bypasses continuous sync race.
Environment specifics
- OS: Windows 11 Pro (dropdown above set to macOS as that was the default — please read as Windows 11)
- Browser/app: Cowork in Claude desktop app
- Vault: Obsidian vault at
C:\Obsidian\<name>\with Obsidian sync active (possibly also within OneDrive-synced tree) - Session model: Claude Opus 4.7
- Terminal: Cowork's own workspace-bash (not an external terminal)
Note on form fields
This Bug Report template is oriented toward Claude Code CLI. The "Claude Code Version", "Platform", "Operating System", and "Terminal/Shell" fields map imperfectly to Cowork's desktop-app context. Please interpret them accordingly.
Affected user
The user can provide a vault snapshot or session transcript (subject to privacy) for diagnosis. Please reach out via this issue.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗