fix(claude-code): remove the erroring attention-bell hook
The hook rang the terminal bell by walking the process ancestry for a process named `claude`, but nix wraps the binary so its `comm` is `.claude-wrapped`. The match never fired: the bell never rang, and the loop fell through to a non-zero exit that surfaced as a Stop hook error on every turn. Remove the hook, its script, and the Stop and Notification wiring. The tmux monitor-bell config is left in place as a general nicety.
This commit is contained in:
@@ -10,18 +10,6 @@
|
||||
let
|
||||
cfg = config.modules.claude-code;
|
||||
user = config.user.name;
|
||||
|
||||
# Rings the terminal bell so tmux flags the background pane.
|
||||
bellHook = [
|
||||
{
|
||||
hooks = [
|
||||
{
|
||||
type = "command";
|
||||
command = "~/.claude/hooks/attention-bell.sh";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
options.modules.claude-code.enable = lib.mkEnableOption ''
|
||||
@@ -57,14 +45,11 @@ in
|
||||
skills = ./skills;
|
||||
|
||||
# Installed under ~/.claude/hooks, referenced by the settings below.
|
||||
hooks."attention-bell.sh" = builtins.readFile ./hooks/attention-bell.sh;
|
||||
hooks."agent-sudo-guard.sh" = builtins.readFile ./hooks/agent-sudo-guard.sh;
|
||||
|
||||
settings = {
|
||||
model = "opus";
|
||||
hooks = {
|
||||
Stop = bellHook;
|
||||
Notification = bellHook;
|
||||
PreToolUse = [
|
||||
{
|
||||
matcher = "Bash";
|
||||
|
||||
Reference in New Issue
Block a user