Repository navigation
fix(claudecode): install user-level hooks into ~/.claude/settings.json - #842
Merged
Merged
Conversation
Claude Code loads user-scope settings from settings.json; settings.local.json is only read as a project file, so the hooks that `gortex install` wrote to ~/.claude/settings.local.json never ran. Write the user-level hooks (and the dry-run plan) to userSettingsPath, which also honours the CLAUDE_CONFIG_DIR override, and have doctor (Inspect) read the same file. Uninstall now strips Gortex hooks from settings.json and still cleans the settings.local.json left behind by earlier installs. Fixes zzet#840
Re-running install now drops Gortex hooks left in ~/.claude/settings.local.json by earlier installs, so a session rooted at $HOME does not load them next to the new user-level ones. RemoveGlobal counted settings.json twice (permissions and hooks); it now counts once. GlobalArtifacts lists settings files only when they hold an mcp__gortex__ permission or a Gortex hook entry, matching what RemoveGlobal removes. The dry-run plan reports settings.json as a single action.
zzet
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #840.
Summary
gortex installwrote the user-level hooks to~/.claude/settings.local.json, which Claude Code only reads as a project file, so the hooks never ran outside a session rooted at the home directory. They now go to~/.claude/settings.json. Hooks left in the old file by earlier installs are migrated, anddoctor/inspect countsettings.jsononce.Changes
settings.json; legacy entries are moved over.Testing
go test -race ./...) (not run in full; the claudecode adapter tests pass: 129 passed, 0 failed)Checklist
Meta["methods"]for interfaces (if applicable) (not applicable)EdgeMemberOfedges to their containing type (if applicable) (not applicable)