app
hook
Public Made by Adomby adom
Registry-native cross-agent auto-update hook, plus claude-rc, the keeper for Claude Remote Control. Keeps adom/core apps and skills current from wiki.adom.inc on every Claude Code and Codex prompt, and keeps `claude rc` alive so users can open AI threads on their container from the Claude mobile app or claude.ai/code.
← Commit history
claude-rc+6−2@@ -64,7 +64,7 @@ running_pid() { pgrep -f "$PAT" | head -1; } # tear down its relay connection, so a bare pkill + immediate pgrep still sees it. stop_server() { pkill -f "$PAT" 2>/dev/null || return 0- pkill -f '^bash -c sleep infinity \| exec claude rc' 2>/dev/null || true+ pkill -f '^bash -c { printf "y.n"; sleep infinity; } \| exec claude rc' 2>/dev/null || true local i; for i in 1 2 3 4 5 6 7 8; do [ -z "$(running_pid)" ] && return 0; sleep 1; done pkill -9 -f "$PAT" 2>/dev/null || true; sleep 1 }@@ -118,7 +118,11 @@ launch() { # closes (sleep infinity) gives it a stdin with no data and no EOF, so it runs until killed. # The pipeline is wrapped in its own bash so `exec` keeps the pgrep pattern on the real # server process, not on the wrapper.- setsid nohup bash -c 'sleep infinity | exec claude rc --name "$1"' _ "$(rc_name)" >> "$LOG" 2>&1 &+ # And the CONSENT LINE MUST BE FED: Claude Code 2.1.251 (the VS Code extension's bundled+ # binary on an Adom Hydrogen workspace) prints "Enable Remote Control? (y/n)" even when+ # stdin is not a TTY and waits for the answer, so a silent pipe leaves it "running" but+ # never connected. One "y" answers it; a build that does not ask ignores the byte.+ setsid nohup bash -c '{ printf "y\n"; sleep infinity; } | exec claude rc --name "$1"' _ "$(rc_name)" >> "$LOG" 2>&1 & # crash-loop guard: remember launch times, keep the last hour's worth local t; t="$(now)" local hist; hist="$(st_get launches)"
package.json+2−2@@ -1,6 +1,6 @@ { "slug": "hook",- "version": "1.3.1",+ "version": "1.3.2", "type": "app", "org": "adom", "bundled": true,@@ -56,7 +56,7 @@ "mode": "0755" } ],- "changelog": "1.3.1: claude-rc keeps stdin open when launching `claude rc` (sleep infinity pipe). With </dev/null the server connected and exited within a second, five times, and the crash-loop guard marked it failed on every container. The watchdog's pgrep pattern also required a path prefix that a PATH launch never has, so it relaunched a live server and reported it as not running. Found on an Adom cloud container and an Adom Hydrogen WSL2 workspace, 2026-08-30. 1.3.0: add claude-rc, which keeps Claude Code Remote Control (`claude rc`) alive so a user can open new AI threads on their container from the Claude mobile app or claude.ai/code. It rides in adom/hook because it needs exactly what this package already owns: a UserPromptSubmit hook and a cron entry. Consent-first -- installing only wires the offer, and the AI asks the user once. Supervision differs by environment: a 2-minute cron watchdog on ah, and the prompt hook itself on hc, which has neither cron nor systemd. No dependency changes.",+ "changelog": "1.3.2: claude-rc feeds the consent line on launch: Claude Code 2.1.251 (the VS Code extension's bundled binary on an Adom Hydrogen workspace) prints 'Enable Remote Control? (y/n)' even without a TTY and waits, so 1.3.1's silent pipe left the server running but never connected. Verified Connected on an Adom Hydrogen WSL2 workspace (ah, cron) and a cloud container (hc). 1.3.1: claude-rc keeps stdin open when launching `claude rc` (sleep infinity pipe). With </dev/null the server connected and exited within a second, five times, and the crash-loop guard marked it failed on every container. The watchdog's pgrep pattern also required a path prefix that a PATH launch never has, so it relaunched a live server and reported it as not running. Found on an Adom cloud container and an Adom Hydrogen WSL2 workspace, 2026-08-30. 1.3.0: add claude-rc, which keeps Claude Code Remote Control (`claude rc`) alive so a user can open new AI threads on their container from the Claude mobile app or claude.ai/code. It rides in adom/hook because it needs exactly what this package already owns: a UserPromptSubmit hook and a cron entry. Consent-first -- installing only wires the offer, and the AI asks the user once. Supervision differs by environment: a 2-minute cron watchdog on ah, and the prompt hook itself on hc, which has neither cron nor systemd. No dependency changes.", "discovery_pitch": "Use when adom packages are behind or an update failed, and when the user asks about Claude Remote Control -- opening AI threads on this container from their phone or claude.ai/code.", "sample_prompts": [ {
page.json+15−3@@ -1,6 +1,6 @@ { "slug": "hook",- "version": "1.3.1",+ "version": "1.3.2", "type": "app", "org": "adom", "bundled": true,@@ -50,7 +50,7 @@ "name": "Kyle Bergstedt", "email": "[email protected]" },- "changelog": "1.3.0: add claude-rc, which keeps Claude Code Remote Control (`claude rc`) alive so a user can open new AI threads on their container from the Claude mobile app or claude.ai/code. It rides in adom/hook because it needs exactly what this package already owns: a UserPromptSubmit hook and a cron entry. Consent-first -- installing only wires the offer, and the AI asks the user once. Supervision differs by environment: a 2-minute cron watchdog on ah, and the prompt hook itself on hc, which has neither cron nor systemd. No dependency changes.",+ "changelog": "1.3.2: claude-rc feeds the consent line on launch: Claude Code 2.1.251 (the VS Code extension's bundled binary on an Adom Hydrogen workspace) prints 'Enable Remote Control? (y/n)' even without a TTY and waits, so 1.3.1's silent pipe left the server running but never connected. Verified Connected on an Adom Hydrogen WSL2 workspace (ah, cron) and a cloud container (hc). 1.3.1: claude-rc keeps stdin open when launching `claude rc` (sleep infinity pipe). With </dev/null the server connected and exited within a second, five times, and the crash-loop guard marked it failed on every container. The watchdog's pgrep pattern also required a path prefix that a PATH launch never has, so it relaunched a live server and reported it as not running. Found on an Adom cloud container and an Adom Hydrogen WSL2 workspace, 2026-08-30. 1.3.0: add claude-rc, which keeps Claude Code Remote Control (`claude rc`) alive so a user can open new AI threads on their container from the Claude mobile app or claude.ai/code. It rides in adom/hook because it needs exactly what this package already owns: a UserPromptSubmit hook and a cron entry. Consent-first -- installing only wires the offer, and the AI asks the user once. Supervision differs by environment: a 2-minute cron watchdog on ah, and the prompt hook itself on hc, which has neither cron nor systemd. No dependency changes.", "discovery_pitch": "Use when adom packages are behind or an update failed, and when the user asks about Claude Remote Control -- opening AI threads on this container from their phone or claude.ai/code.", "sample_prompts": [ {@@ -65,5 +65,17 @@ "label": "Am I up to date?", "prompt": "are my adom packages current with the wiki?" }+ ],+ "managed_files": [+ {+ "src": "check-updates.sh",+ "dest": "~/.adom/hooks/adom-core-update.sh",+ "mode": "0755"+ },+ {+ "src": "claude-rc",+ "dest": "~/.local/bin/claude-rc",+ "mode": "0755"+ } ]-}+}