@@ -398,6 +398,11 @@ func dryRunPreCompactHooks(config *Config, input *PreCompactInput, rawJSON inter
398398
399399 executed := false
400400 for i , hook := range config .PreCompact {
401+ // Warn about invalid matcher values (early detection of configuration mistakes)
402+ if hook .Matcher != "" && hook .Matcher != "manual" && hook .Matcher != "auto" {
403+ fmt .Fprintf (os .Stderr , "Warning: PreCompact hook %d has invalid matcher value %q (expected: \" manual\" , \" auto\" , or empty)\n " , i , hook .Matcher )
404+ }
405+
401406 // マッチャーチェック (manual/auto)
402407 if hook .Matcher != "" && hook .Matcher != input .Trigger {
403408 continue
@@ -1122,16 +1127,16 @@ func executePreCompactHooksJSON(config *Config, input *PreCompactInput, rawJSON
11221127 var systemMessageBuilder strings.Builder
11231128
11241129 for i , hook := range config .PreCompact {
1125- // マッチャーチェック (manual/auto)
1126- if hook .Matcher != "" && hook .Matcher != input .Trigger {
1127- continue
1128- }
1129-
11301130 // Warn about invalid matcher values (early detection of configuration mistakes)
11311131 if hook .Matcher != "" && hook .Matcher != "manual" && hook .Matcher != "auto" {
11321132 fmt .Fprintf (os .Stderr , "Warning: PreCompact hook %d has invalid matcher value %q (expected: \" manual\" , \" auto\" , or empty)\n " , i , hook .Matcher )
11331133 }
11341134
1135+ // マッチャーチェック (manual/auto)
1136+ if hook .Matcher != "" && hook .Matcher != input .Trigger {
1137+ continue
1138+ }
1139+
11351140 // 条件チェック
11361141 shouldExecute := true
11371142 for _ , condition := range hook .Conditions {
0 commit comments