You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
claude install --strict overwrites the entire ~/.claude/settings.json (destroys mcpServers, plugins, and all other hooks) with no backup #2167
Data loss. graphify claude install --strict replaced my entire ~/.claude/settings.json with a file containing only graphify's own hooks. No backup was written. Everything else in the file was destroyed.
Affected version
graphifyy 0.9.25 (uv tool install)
Windows 11, Claude Code
What happened
$ cd~
$ graphify claude install --strictgraphify section written to C:\Users\<user>\CLAUDE.md .claude/settings.json -> PreToolUse hooks registered (Bash|Grep search + Read/Glob) (strict)
~/.claude/settings.json went from 5117 bytes to 519 bytes.
Every other hook, both MCP server definitions, all plugin registrations, all marketplaces, and every top-level preference were gone. The file was not merged — it was rewritten from a template.
No .bak was created by graphify. I recovered only because I had made an unrelated backup 90 minutes earlier.
Expected
claude install should merge into the existing settings.json:
append its entries to hooks.PreToolUse, leaving existing entries intact
leave all other hooks.* sections untouched
never touch mcpServers, enabledPlugins, extraKnownMarketplaces, or top-level keys
This is what the Codex installer already does correctly — _install_codex_hook in install.py reads the existing hooks.json, filters only graphify entries, and extends:
The Claude Code path should do the same thing. It appears to write a fresh object instead.
Also, please write a backup
Given this writes to a live agent config, a timestamped .bak before any write would turn a catastrophic failure into a recoverable one. Related precedent: #2062 (graphify uninstall deletes user-written content).
Secondary bug in the same command
The same invocation wrote the markdown section to ~/CLAUDE.md (the cwd) rather than ~/.claude/CLAUDE.md (Claude Code's user-scope memory file). An earlier graphify install run from a different directory had correctly targeted ~/.claude/CLAUDE.md, so the destination depends on the shell's working directory. Same class as #2164.
Reproduce
Have a populated ~/.claude/settings.json with mcpServers, enabledPlugins, and hooks in several sections
graphify claude install --strict
Diff the file
Environment
Windows 11, PowerShell 5.1
graphifyy 0.9.25 via uv tool install
Claude Code with 7 plugins, 2 MCP servers, hooks in 6 sections
Activity
fix(install): never clobber an unparseable settings file; back up bef…
chore: bump to 0.9.27; changelog for #2167/#2169/#2154/#2153/#2147/#2168
safishamsi commentedon Jul 26, 2026
Fixed in v0.9.27. The installers now read utf-8-sig, refuse to modify a settings file that isn't a JSON object (instead of clobbering it), and back up to .graphify-bak before any write. https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.27
Squashed commit of the following:
fix(install): never clobber an unparseable settings file; back up bef…
chore: bump to 0.9.27; changelog for Graphify-Labs#2167/Graphify-Labs…