The merge guard (.claude/hooks/guard-merge.sh) blocks some harmless commands, just because they contain the word "merge".
What happens
The guard treats every command that calls gitea.sh and contains "merg" as a merge attempt. If it isn't the exact merge command, the guard refuses it. That also hits commands that merge nothing, for example:
a status query after a merge: gitea.sh GET .../pulls/13 | jq '{merged}'
Gitea's own "is this PR merged?" check: gitea.sh GET .../pulls/13/merge
opening a PR with an inline title that contains "merge"
Claude then gets "Merge refused" and has to rephrase the command. Nothing breaks and nothing becomes unsafe: the guard errs on the strict side.
Why fix it
It costs time and tokens in every /merge run that touches the merge skill or the guard itself.
False alarms wear down trust in a guard. If it often refuses harmless things, people start working around it, and that defeats its purpose.
When to work on it
Low priority. Pick it up when one of these is true:
you change guard-merge.sh anyway, for example when preparing deploy-on-merge (then it's a small extra step in the same PR), or
the false alarms come up regularly in /merge runs.
Before deploy-on-merge is enabled, the guard should be in its final shape anyway, so this is the latest point.
Proposed fix
Treat only write calls (POST) whose path ends in /merge as a merge. GET calls are always allowed, because a read can't merge anything.
Keep everything else as it is: strict single-command form, head commit pin, newest review must be a pass.
Add the three examples above as test cases that must pass, and keep the existing refusal cases.
Done when
The three example commands pass the guard, and every merge attempt that is refused today is still refused.
The merge guard (`.claude/hooks/guard-merge.sh`) blocks some harmless commands, just because they contain the word "merge".
## What happens
The guard treats every command that calls `gitea.sh` and contains "merg" as a merge attempt. If it isn't the exact merge command, the guard refuses it. That also hits commands that merge nothing, for example:
- a status query after a merge: `gitea.sh GET .../pulls/13 | jq '{merged}'`
- Gitea's own "is this PR merged?" check: `gitea.sh GET .../pulls/13/merge`
- opening a PR with an inline title that contains "merge"
Claude then gets "Merge refused" and has to rephrase the command. Nothing breaks and nothing becomes unsafe: the guard errs on the strict side.
## Why fix it
- It costs time and tokens in every `/merge` run that touches the merge skill or the guard itself.
- False alarms wear down trust in a guard. If it often refuses harmless things, people start working around it, and that defeats its purpose.
## When to work on it
Low priority. Pick it up when one of these is true:
- you change `guard-merge.sh` anyway, for example when preparing deploy-on-merge (then it's a small extra step in the same PR), or
- the false alarms come up regularly in `/merge` runs.
Before deploy-on-merge is enabled, the guard should be in its final shape anyway, so this is the latest point.
## Proposed fix
- Treat only **write calls** (`POST`) whose path ends in `/merge` as a merge. `GET` calls are always allowed, because a read can't merge anything.
- Keep everything else as it is: strict single-command form, head commit pin, newest review must be a pass.
- Add the three examples above as test cases that must pass, and keep the existing refusal cases.
## Done when
The three example commands pass the guard, and every merge attempt that is refused today is still refused.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The merge guard (
.claude/hooks/guard-merge.sh) blocks some harmless commands, just because they contain the word "merge".What happens
The guard treats every command that calls
gitea.shand contains "merg" as a merge attempt. If it isn't the exact merge command, the guard refuses it. That also hits commands that merge nothing, for example:gitea.sh GET .../pulls/13 | jq '{merged}'gitea.sh GET .../pulls/13/mergeClaude then gets "Merge refused" and has to rephrase the command. Nothing breaks and nothing becomes unsafe: the guard errs on the strict side.
Why fix it
/mergerun that touches the merge skill or the guard itself.When to work on it
Low priority. Pick it up when one of these is true:
guard-merge.shanyway, for example when preparing deploy-on-merge (then it's a small extra step in the same PR), or/mergeruns.Before deploy-on-merge is enabled, the guard should be in its final shape anyway, so this is the latest point.
Proposed fix
POST) whose path ends in/mergeas a merge.GETcalls are always allowed, because a read can't merge anything.Done when
The three example commands pass the guard, and every merge attempt that is refused today is still refused.