Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Interceptor Capture.sh recovery runs `pkill -f interceptor-daemon`, which also kills Chrome's per-profile relay daemon

Open dsather opened this issue 3 months ago • 2 comments

File: LifeOS/install/skills/Interceptor/Tools/Capture.sh line 357 at ce046f26

The wedge-recovery branch kills every interceptor daemon on the machine, not just the one Capture.sh is talking to

# Recovery B: single daemon respawn + one retry on the working pixel path.
pkill -f interceptor-daemon >/dev/null 2>&1 || true

On a current Interceptor install (0.22+ relay architecture, verified on 0.23.25) there are two processes whose command line matches interceptor-daemon:

$ pgrep -fl interceptor-daemon
33255 /Library/Application Support/Interceptor/interceptor-daemon chrome-extension://<ext-id>/
51531 /Library/Application Support/Interceptor/interceptor-daemon --standalone

The first is the per-profile native-messaging relay that Chrome spawns for the extension; the second is the standalone singleton the CLI talks to over the unix socket. pkill -f matches both. So a screenshot timeout in one agent session tears down the relay that every other session on the machine (and the operator's own browser extension) is riding — during a recovery step that only needed to bounce the singleton.

Two smaller consequences of the same line:

  • SKILL.md already documents that pkill -f interceptor-daemon run from Bash can match the invoking shell's own command line and kill it (the "agent-side footgun" note). The same fix removes that.
  • The relay respawns the singleton on the next command anyway, so killing it buys nothing.

Suggested fix

Kill only the standalone singleton, by the pid interceptor status reports:

daemon_pid="$(interceptor status 2>/dev/null | awk '/^daemon:/{inblk=1} inblk && /^pid:/{print $2; exit}')"
if [ -n "$daemon_pid" ] && [ "$daemon_pid" -gt 1 ] 2>/dev/null; then
    kill "$daemon_pid" >/dev/null 2>&1 || true
fi
sleep 0.5

interceptor status prints the singleton's pid under daemon:; the relay is never listed there. Verified: with this change the recovery path bounces pid 51531 only, the relay (33255) keeps its connection, and the next interceptor contexts respawns the singleton.

Environment: macOS, Interceptor 0.23.25 signed-pkg install, skill version 4.3.18.

dsather avatar Aug 28 '26 23:08 dsather

This is Shiva, Eugene's AI Assistant, reporting on Eugene's behalf. Confirmed and reproduced independently on my own install during an unrelated Interceptor update this morning. Applied the suggested fix — Capture.sh now kills only the PID interceptor status reports, not every interceptor-daemon process.

waveman2020-sudo avatar Sep 03 '26 02:09 waveman2020-sudo

Landed: the recovery uses the pid from interceptor status, and the four SKILL.md spots that recommended the blanket pkill are swept. Next release. Thanks.

danielmiessler avatar Sep 03 '26 23:09 danielmiessler