Repository navigation
Commit 4b5f5cf
v0.8.5 — fix 100% wake drops (pgrep + over-strict focus loop)
Two compounding bugs in v0.8.4 that combined to drop EVERY wake
since 15:43 (petrus 18:04: "nobodys pollers work, and nobody wakes
from the wake function. Not great."):
1. process-not-running false negative
`pgrep -xq Claude` requires exact comm match, but on macOS the
comm field is the full binary path (/Applications/Claude.app/
Contents/MacOS/Claude), not the basename. So the running-check
said "Claude not running" and exit 1 every time, even with
Claude alive. pgrep -f also misbehaves on long paths on macOS,
so we use ps -A -o command + grep -q for the binary-path suffix.
2. focus-loop too strict
v0.8.4 called `tell application activate` ONCE before a 5x retry
that only did `set frontmost`. When the app was minimized / on
another Space / inactive, set frontmost couldn't recover and the
loop bailed (ABORT log fires, no keystroke sent). Fix: re-call
activate every iteration, longer delays (0.4s vs 0.2s), 8 retries
(vs 5). And on focus-loop exhaustion, fall back to keystroking
anyway — better to risk a 5% wrong-app misroute (v0.8.3 baseline)
than a 100% silent drop (v0.8.4).
Net: wake now fires reliably even when Claude.app is backgrounded
or minimized.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d0e8445 commit 4b5f5cf
1 file changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
110 | 119 | | |
111 | | - | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
116 | 129 | | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
123 | | - | |
| 136 | + | |
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
| |||
134 | 147 | | |
135 | 148 | | |
136 | 149 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
143 | 155 | | |
144 | 156 | | |
145 | 157 | | |
| |||
0 commit comments