[BUG] Cowork-GlobalInstructions-Revert-Bug-Report_2026-06-03_v4
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?
Cowork Global Instructions Revert - Bug Report
- Dates: 2026-06-02 and 2026-06-03 (times are local, MacBook clock)
- Reporter: Ryan Van Straten
- Product area: Claude desktop app - Cowork - Settings - global instructions
- Status: ROOT CAUSE IDENTIFIED AND MITIGATION VALIDATED. Resumed sessions write their frozen, stale copy of the global instructions back over the user's current global instructions. Overwriting the per-session snapshot files with current content stops the regression, confirming the write-back source is the snapshot FILE.
- Version (this doc): v4. Change from v3: mitigation tested and validated, which confirms the write-back reads from the per-session snapshot file (not an internal DB record); scheduled-task sessions confirmed as the vector for unattended reverts.
Summary (root cause)
Each Cowork session stores a frozen copy of the global instructions at session creation time:.../local-agent-mode-sessions/<org>/<profile>/local_<sessionId>/.claude/CLAUDE.md
When a session is resumed, that session's stale snapshot is written back to the profile-level canonical file:.../<profile>/memory/CLAUDE.md
Result: opening any historical session silently resurrects whatever version of the global instructions existed when that session was created - overwriting the user's current saved instructions. Depending on which session is touched, instructions revert to an old version, an older default template, or empty. This includes unattended reverts: scheduled-task sessions carry snapshots too, so a morning scheduled run can wipe or revert the user's instructions with no user action (observed: wipe to 0 bytes at 09:54:05 on 06-03).
Byte-level evidence (regression)
- 2026-06-03 13:29:17 - canonical
memory/CLAUDE.mdconfirmed 0 bytes (wiped at 09:54:05 that morning, unattended). - ~13:29 - user resumed a session created 2026-06-02 10:46; its frozen snapshot = a stale test version (10,239 bytes, sha256 fad0d69b1aed776cfd3c50ec263bc933957a1024a55c161bc39d916821e185a2).
- 13:31:09 -
memory/CLAUDE.mdrewritten to exactly that content (sha256 identical to the resumed session's snapshot). No other files in the profile changed within +/- 3 minutes (mtime sweep). Equivalent reverts reproduced fully offline on 06-02 (network ruled out), with Dispatch (Beta) disabled org-wide (Dispatch ruled out). - Era-matching: sessions created during the "empty" era carry 0-byte snapshots; "marker"-era sessions carry the 10,239-byte version; dozens of older sessions carry the original default "Workflow Orchestration" template. The canonical file's value over two days tracks exactly which era's session was most recently active.
- In-session reverts of fresh Saves occurred ~60-115 seconds after each Save while a stale-snapshot session was open. Save-then-quit-immediately committed cleanly (no open session to write back).
Mitigation validation (confirms the mechanism)
- 2026-06-03 ~14:50 - the snapshot files of 4 test sessions (covering all three stale eras) were overwritten with the user's current instructions (14,398 bytes, sha256 39ec4610af71316d05d864b2fc6d689525560462b785b97e219867155a7d527a). Originals archived first.
- 14:57:28 - user resumed one of the sanitized sessions.
memory/CLAUDE.mdwas rewritten byte-identical to the sanitized snapshot (39ec46...), replacing the stale value. - Conclusion: the write-back source is the session's
.claude/CLAUDE.mdFILE on disk. Sanitizing the file changes what gets written back. All 190 session snapshots on the machine were subsequently overwritten with current content (100% verified by sha256) as a user-side workaround.
Reproduction
- Save new global instructions in Settings - Cowork. Quit the app (commits cleanly).
- Reopen and resume any session created before step 1.
- Within ~1-2 minutes,
memory/CLAUDE.md(and subsequently the Settings UI) reverts to the instruction set that existed when that old session was created. Reproduces offline.
Environment
- macOS (Apple Silicon). Claude desktop, updater last-seen 1.9659.4, Electron 41.6.1 / Chromium 146.
- Profile GUID: 85030fd3-aaf9-4e2d-8cdf-28b856c95ff9
- Full two-day timeline with hashes available (v1-v3 of this report).
Impact
- Data loss: user's saved global instructions are silently destroyed or replaced by stale/empty versions, including unattended via scheduled-task sessions.
- Every historical session is a latent carrier; users who open past sessions cannot keep their settings without manually sanitizing snapshot files.
Requested fix
- Session snapshots should be read-only context for that session, never written back to the profile-level canonical instructions. Newer-timestamp / user-saved content must win over session-creation-time copies.
User-side workaround in use (until fixed)
- Keep the instructions master in an external text file.
- After each Settings edit: Save, quit immediately, reopen (commits the save).
- Run a script that archives and then overwrites every session's
.claude/CLAUDE.md(andmemory/CLAUDE.md) with the current instructions, then verifies by sha256, so resumed sessions write back correct content.
What Should Happen?
Global settings should never be overwritten by earlier versions stored in sessions
Error Messages/Logs
Steps to Reproduce
see what's wrong section
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗