ECC/scripts/hooks
Farzul Nizam Zolkifli 1e5fa96d75
fix(context-monitor): make cost warnings informational, not commands (#2091)
The PostToolUse cost warnings emit imperative text via additionalContext
("Stop and inform the user...", "Review whether...", "Consider whether...").
Subagents read additionalContext as an instruction and obey the "Stop",
abandoning their task and returning a prompt-for-direction instead of their
result — derailing multi-agent workflows. The main loop is also nudged to
halt mid-task.

Reword all three severities to pure-informational data: keep the
CRITICAL/WARNING/NOTICE label + the dollar figure (and the threshold), drop
the imperative sentence, and state plainly it is informational. No logic,
severity, or threshold change. Existing tests pass (they assert the labels +
severities, which are preserved).

Before: `COST CRITICAL: Session cost is $X. Stop and inform the user about high cost before continuing.`
After:  `COST CRITICAL: session total ~$X (over $50). Informational only — not an instruction to stop.`

Co-authored-by: OrenG Tools <tools@orengacademy.com>
2026-06-07 13:26:48 +08:00
..
auto-tmux-dev.js fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
bash-hook-dispatcher.js fix: surface warn-only PreToolUse hooks (#2084) 2026-05-28 07:45:46 -04:00
block-no-verify.js fix: close block-no-verify bypass holes 2026-05-12 22:28:12 -04:00
check-console-log.js Fix stdin overflow bug in hook scripts - truncate chunks to stay within MAX_STDIN limit 2026-02-18 07:40:12 +00:00
check-hook-enabled.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
config-protection.js fix: integrate recent hook and docs PRs (#1905) 2026-05-14 21:37:28 -04:00
cost-tracker.js fix(hooks): prefer fresh harness cost cache (#2054) 2026-05-25 14:08:11 -04:00
design-quality-check.js feat: add web frontend rules and design quality hook 2026-04-02 17:33:17 -07:00
desktop-notify.js feat(desktop-notify): route OSC 9 notifications through Ghostty (#2114) 2026-06-07 13:26:32 +08:00
doc-file-warning.js fix: surface warn-only PreToolUse hooks (#2084) 2026-05-28 07:45:46 -04:00
ecc-context-monitor.js fix(context-monitor): make cost warnings informational, not commands (#2091) 2026-06-07 13:26:48 +08:00
ecc-metrics-bridge.js fix(hooks): stop false loop warnings and repeated identical context warnings (#2121) 2026-06-07 13:26:30 +08:00
ecc-statusline.js chore: update statusline ANSI color palette 2026-05-15 23:18:01 -04:00
evaluate-session.js Fix stdin overflow bug in hook scripts - truncate chunks to stay within MAX_STDIN limit 2026-02-18 07:40:12 +00:00
gateguard-fact-force.js fix(gateguard): gate force/path git checkout as destructive (#2158) 2026-06-07 13:26:08 +08:00
governance-capture.js fix: fold session manager blockers into one candidate 2026-03-24 23:08:27 -04:00
insaits-security-monitor.py test: cover hook bootstrap and InsAIts monitor 2026-04-29 17:45:22 -04:00
insaits-security-wrapper.js fix: fail open on insaits monitor errors 2026-04-29 18:03:33 -04:00
mcp-health-check.js fix: treat MCP HTTP 406 probes as reachable 2026-05-18 12:48:52 -04:00
observe-runner.js fix: route continuous learning observe hooks through node 2026-04-29 21:28:59 -04:00
plugin-hook-bootstrap.js fix: normalize POSIX CLAUDE_PLUGIN_ROOT to Windows path in hook bootstrap (#2139) 2026-06-07 13:26:17 +08:00
post-bash-build-complete.js fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
post-bash-command-log.js fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
post-bash-dispatcher.js fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
post-bash-pr-created.js fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
post-edit-accumulator.js perf(hooks): batch format+typecheck at Stop instead of per Edit (#746) 2026-03-31 14:12:12 -07:00
post-edit-console-warn.js Merge branch 'affaan-m:main' into main 2026-02-18 18:33:04 +05:30
post-edit-format.js fix: port Windows hook safety fixes (#1719) 2026-05-11 03:56:51 -04:00
post-edit-typecheck.js Fix stdin overflow bug in hook scripts - truncate chunks to stay within MAX_STDIN limit 2026-02-18 07:40:12 +00:00
pre-bash-commit-quality.js fix: run pre-bash linters through windows wrappers 2026-04-29 18:59:10 -04:00
pre-bash-dev-server-block.js fix(dev-server-block): stop blocking dev-<suffix> scripts (#2179) 2026-06-07 13:25:39 +08:00
pre-bash-dispatcher.js fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
pre-bash-git-push-reminder.js fix: surface warn-only PreToolUse hooks (#2084) 2026-05-28 07:45:46 -04:00
pre-bash-tmux-reminder.js fix: surface warn-only PreToolUse hooks (#2084) 2026-05-28 07:45:46 -04:00
pre-compact.js fix: nullish coalescing in evaluate-session config, narrow pre-compact glob, add 11 tests 2026-02-13 02:42:01 -08:00
pre-write-doc-warn.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
pretooluse-visible-output.js fix: surface warn-only PreToolUse hooks (#2084) 2026-05-28 07:45:46 -04:00
quality-gate.js refactor: deduplicate config lists and unify resolveFormatterBin branches 2026-03-11 10:45:28 +09:00
run-with-flags-shell.sh fix(hooks): pass phase argument from hook ID to observe.sh (#1042) 2026-03-31 14:05:16 -07:00
run-with-flags.js fix: surface warn-only PreToolUse hooks (#2084) 2026-05-28 07:45:46 -04:00
session-activity-tracker.js Merge pull request #1384 from KeWang0622/fix/lint-md028-eqeqeq 2026-04-12 23:03:19 -07:00
session-end-marker.js fix: clean up observer sessions on lifecycle end 2026-04-02 18:02:29 -07:00
session-end.js fix(session-end): preserve $-sequences in user messages when rewriting summary (#2180) 2026-06-07 13:25:36 +08:00
session-start-bootstrap.js fix: salvage remaining stale queue fixes (#1754) 2026-05-11 16:41:08 -04:00
session-start.js fix(session-start): support ECC_SESSION_RETENTION_DAYS opt-out + document env var (#2151) (#2163) 2026-06-07 13:01:33 +08:00
stop-format-typecheck.js perf(hooks): batch format+typecheck at Stop instead of per Edit (#746) 2026-03-31 14:12:12 -07:00
suggest-compact.js fix(suggest-compact): clean up old counter temp files (#2159) 2026-06-07 13:01:27 +08:00