Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: PreToolUse hook fires on every Bash invocation, not just git pushes — the command runs npx -y resolution on every shell command, adding latency to all Bash operations. Consider pre-installing aireceipts-cli as a project dependency and running npx aireceipts-cli hook pre-push (or a direct path) to eliminate the resolution overhead on non-push Bash calls.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .claude/settings.json, line 5:

<comment>PreToolUse hook fires on every Bash invocation, not just git pushes — the command runs `npx -y` resolution on every shell command, adding latency to all Bash operations. Consider pre-installing `aireceipts-cli` as a project dependency and running `npx aireceipts-cli hook pre-push` (or a direct path) to eliminate the resolution overhead on non-push Bash calls.</comment>

<file context>
@@ -0,0 +1,16 @@
+  "hooks": {
+    "PreToolUse": [
+      {
+        "matcher": "Bash",
+        "hooks": [
+          {
</file context>

"hooks": [
{
"type": "command",
"command": "npx -y aireceipts-cli@latest hook pre-push",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard the receipt hook to only run on pushes

In any Claude Code session for this repo, this PreToolUse group matches every Bash tool call, and because the handler has no if filter, the docs' behavior is that “every handler in the matched group runs.” That means npx -y aireceipts-cli@latest is spawned before unrelated commands like rg, npm test, or git status, adding up to the 10s timeout and npm/network error noise even though the receipt CLI can only do useful work for git push; add an if guard for push commands or a small wrapper that exits before invoking npx for non-push Bash inputs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin the auto-run receipt CLI version

Because this project-level hook is committed and Claude Code executes command hooks automatically for matching Bash calls, @latest lets a future aireceipts-cli release change the code running in contributors' sessions without any repo change; it also conflicts with the commit text calling this dogfood for v0.6.0. Pin the package to the known compatible version so receipt generation remains reproducible and reviewable.

Useful? React with 👍 / 👎.

"timeout": 60
}
]
}
]
}
}
Loading