Settings file corruption: markdown content embedded on exit
Resolved 💬 4 comments Opened Feb 11, 2026 by m-toulon Closed Mar 11, 2026
Bug Report
Environment:
- WSL2 / Linux
- Claude Code CLI
Issue:
Every time I exit a Claude Code session, the settings file gets corrupted with embedded markdown content from the project directory.
Error Message:
The : pattern must be at the end. Move : to the end for prefix matching, or use * for wildcard matching.
Root Cause:
- Markdown files from the project directory are being parsed and embedded into .claude/projects/.../settings.local.json
- Documentation and brainstorm file content ends up in the settings file
- Happens consistently on every exit, making settings file unreadable
Workaround Attempted:
- Moving all markdown files to subdirectories (failed)
- Manually cleaning settings.json (issue returns on next exit)
Impact:
- Settings file becomes invalid JSON
- User forced to choose between exit/continue prompts
- Blocks normal workflow
Reproduction:
- Create project with markdown documentation files
- Run Claude Code session
- Exit normally
- Check .claude/projects/.../settings.local.json - contains embedded markdown
Expected Behavior:
Settings file should remain valid JSON with configuration only. Markdown project files should never be embedded.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗