claude-code - 💡(How to fix) Fix [BUG] Cowork custom instructions reset to initial value on app restart [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45097Fetched 2026-04-09 08:13:21
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1renamed ×1

Custom instructions set in Settings > Cowork (under the Cowork tab) do not persist across app restarts. They work during the active session but revert to the very first value ever saved when Claude Desktop is restarted or a new session is created.

Root Cause

Custom instructions set in Settings > Cowork (under the Cowork tab) do not persist across app restarts. They work during the active session but revert to the very first value ever saved when Claude Desktop is restarted or a new session is created.

Code Example

~/Library/Application Support/Claude/local-agent-mode-sessions/{org-id}/{user-id}/memory/CLAUDE.md
RAW_BUFFERClick to expand / collapse

Description

Custom instructions set in Settings > Cowork (under the Cowork tab) do not persist across app restarts. They work during the active session but revert to the very first value ever saved when Claude Desktop is restarted or a new session is created.

Steps to reproduce

  1. Open Claude Desktop > Cowork > Settings > Cowork
  2. Write custom instructions in the text field and save
  3. Verify they work in the current session
  4. Quit and reopen Claude Desktop
  5. Go back to Settings > Cowork — the instructions have reverted to the original first-ever saved value

What happens

The instructions revert to whatever was first written when the Cowork session was initially created. Subsequent edits (both from the UI and by directly editing the file) are lost on restart.

The underlying file is:

~/Library/Application Support/Claude/local-agent-mode-sessions/{org-id}/{user-id}/memory/CLAUDE.md

This file gets overwritten with the original value each time a new local session is created. Edits made via the UI or directly to this file are not persisted as the new source of truth.

Expected behavior

Custom instructions saved from the Cowork settings UI should persist across restarts and new sessions, or at minimum sync bidirectionally with the underlying file.

Environment

  • Claude Desktop (macOS)
  • Cowork mode, Cowork settings
  • Observed consistently across multiple restarts

extent analysis

TL;DR

The issue can likely be resolved by ensuring that the custom instructions are properly persisted to the underlying file CLAUDE.md and that this file is not overwritten with the original value on restart.

Guidance

  • Verify that the CLAUDE.md file is being updated correctly when custom instructions are saved through the UI, and check for any file permissions issues that might prevent writing to this file.
  • Investigate the session creation process to determine why the original value is being written to the CLAUDE.md file on each restart, and consider modifying this process to use the persisted custom instructions instead.
  • Check if there are any caching mechanisms or temporary files involved that might be causing the custom instructions to be lost on restart.
  • Consider adding logging or debugging statements to track the flow of data and identify where the custom instructions are being overwritten.

Example

No specific code example can be provided without more information about the implementation details of Claude Desktop, but a potential solution might involve modifying the code that handles session creation to read from the CLAUDE.md file instead of overwriting it with the original value.

Notes

The exact solution will depend on the specifics of how Claude Desktop handles data persistence and session creation, which are not fully detailed in the issue description. Further investigation and debugging will be necessary to determine the root cause and develop a complete fix.

Recommendation

Apply a workaround to manually persist the custom instructions to the CLAUDE.md file, such as by creating a script that periodically backs up the file or by modifying the UI to prompt the user to save changes to a separate file. This is a temporary solution until the underlying issue can be fully resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Custom instructions saved from the Cowork settings UI should persist across restarts and new sessions, or at minimum sync bidirectionally with the underlying file.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING