Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

install: installing or uninstalling the Claude Code guard destroys unrelated existing hooks

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
security

Research direction

Start with core/install/clients.go around line 96 and trace the Claude Code install and uninstall paths. Check how the hooks configuration is read and written, then reproduce the issue with an unrelated hook entry. Done means install and uninstall preserve unrelated entries while changing only hooks owned by this tool.

Written by the indexing model from the issue text.

Description

bug

Problem

In packages/core/install/clients.go:96, the install/uninstall logic for the Claude Code integration overwrites the hooks configuration file wholesale rather than merging its own hook entries into whatever hooks configuration already exists, so any hooks the user had configured independently of this tool are destroyed.

Impact

A user who has their own Claude Code hooks configured (for unrelated tooling) loses them the moment they install or uninstall the guard integration, since the write path replaces the file's content rather than merging/patching only the entries this tool owns.

Repro

  1. Configure a custom, unrelated hook entry in the Claude Code hooks configuration file.
  2. Run the guard's install (or uninstall) command for the Claude Code integration.
  3. Inspect the hooks configuration file afterward and observe the custom entry is gone.

Suggested fix

Parse the existing hooks configuration, add or remove only the specific entries this tool owns (e.g. tagged by a recognizable command/name), and write back the merged result, leaving any unrelated existing entries untouched. Uninstall should symmetrically remove only its own entries, not the whole file or unrelated hooks.

Dominant language
Go
Stars
157
Forks
19
Avg merge
4h 4m
Merged PRs (30d)
81

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from solongate/agent-security

All issues in solongate/agent-security

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.