Summary
Child of #3508 (Windows process-creation tax). This issue covers one hook: pr-issue-linkage gate in the source-control plugin.
Measured
|
|
| Plugin |
source-control |
| Hook |
pr-issue-linkage gate |
| Event(s) |
PreToolUse:Bash |
| Timeouts in window |
423 |
| Average duration |
24.7s |
| Worst observed |
115.3s |
| Configured timeout |
15 s |
Every recorded run exceeded the 15 s timeout, so this guard is killed before it renders a verdict. It currently costs wall-clock without providing protection on this platform.
Context from the parent
Process creation on the affected host costs 0.3-0.9 s per spawn (bash -c true = 661 ms, jq -n 1 = 908 ms, cmd.exe /c exit = 872 ms, against ~3-5 ms on a healthy host). User CPU time is ~1% of wall-clock, so the fix is reducing the number of process spawns, not optimizing script logic. See #3508 for the full measurement and environment detail.
Specific guidance
Highest single offender in the corpus. Fires on every Bash call but only needs to act on PR-creating invocations (gh pr create / gh pr edit). Narrowing the matcher to those removes ~99% of its firings outright.
Acceptance criteria
Method
Counts from ~/.claude/projects/**/*.jsonl hook_cancelled attachments with timedOut: true, across 236 sessions, 2026-08-23 to 2026-08-31.
Summary
Child of #3508 (Windows process-creation tax). This issue covers one hook:
pr-issue-linkage gatein thesource-controlplugin.Measured
source-controlpr-issue-linkage gatePreToolUse:BashEvery recorded run exceeded the 15 s timeout, so this guard is killed before it renders a verdict. It currently costs wall-clock without providing protection on this platform.
Context from the parent
Process creation on the affected host costs 0.3-0.9 s per spawn (
bash -c true= 661 ms,jq -n 1= 908 ms,cmd.exe /c exit= 872 ms, against ~3-5 ms on a healthy host). User CPU time is ~1% of wall-clock, so the fix is reducing the number of process spawns, not optimizing script logic. See #3508 for the full measurement and environment detail.Specific guidance
Highest single offender in the corpus. Fires on every Bash call but only needs to act on PR-creating invocations (gh pr create / gh pr edit). Narrowing the matcher to those removes ~99% of its firings outright.
Acceptance criteria
jq).grep/sed/cut/tr/basename/dirnameon the hot path are replaced with bash builtins.Method
Counts from
~/.claude/projects/**/*.jsonlhook_cancelledattachments withtimedOut: true, across 236 sessions, 2026-08-23 to 2026-08-31.