From 77de1462e91fac72a743d7983d2a3721a4867bec Mon Sep 17 00:00:00 2001 From: Serge Gatezh <2880401+gatezh@users.noreply.github.com> Date: Tue, 14 Apr 2026 12:00:03 -0600 Subject: [PATCH] fix: work around RTK v0.36.0 GDPR consent hang in non-interactive builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RTK ≥0.36.0 added a telemetry consent prompt that blocks on stdin, hanging indefinitely in Docker/devcontainer builds. Add `timeout 10` to kill the process after hook setup completes, and set RTK_TELEMETRY_DISABLED=1 as defense-in-depth. Temporary workaround until upstream fix lands: https://github.com/rtk-ai/rtk/issues/1307 Closes #77 --- .devcontainer/init-plugins.sh | 5 ++++- claude-code/.devcontainer/init-plugins.sh | 5 ++++- ralphex-fe/init-docker.sh | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.devcontainer/init-plugins.sh b/.devcontainer/init-plugins.sh index 41f0114..a4478b5 100755 --- a/.devcontainer/init-plugins.sh +++ b/.devcontainer/init-plugins.sh @@ -46,8 +46,11 @@ done # Initialize rtk global hook for Claude Code (auto-rewrite mode). # --hook-only: installs only the PreToolUse rewrite hook, no workspace artifacts. +# WORKAROUND: RTK ≥0.36.0 added a GDPR telemetry consent prompt that hangs in +# non-interactive environments. timeout + RTK_TELEMETRY_DISABLED work around it. +# Remove when upstream fixes it: https://github.com/rtk-ai/rtk/issues/1307 echo "Initializing rtk (token optimizer)..." -rtk init -g --hook-only --auto-patch || { +RTK_TELEMETRY_DISABLED=1 timeout 10 rtk init -g --hook-only --auto-patch || { echo "Note: rtk init may have already been configured or rtk not available" } diff --git a/claude-code/.devcontainer/init-plugins.sh b/claude-code/.devcontainer/init-plugins.sh index 268b0b1..99a91fe 100644 --- a/claude-code/.devcontainer/init-plugins.sh +++ b/claude-code/.devcontainer/init-plugins.sh @@ -75,8 +75,11 @@ fi # ── rtk init (token-optimized CLI proxy) ──────────────────────────────────── # Global hook-first mode: installs only the PreToolUse rewrite hook to ~/.claude/, # no workspace artifacts (CLAUDE.md, .rtk/). Safe to run multiple times. +# WORKAROUND: RTK ≥0.36.0 added a GDPR telemetry consent prompt that hangs in +# non-interactive environments. timeout + RTK_TELEMETRY_DISABLED work around it. +# Remove when upstream fixes it: https://github.com/rtk-ai/rtk/issues/1307 if command -v rtk &>/dev/null; then - rtk init -g --hook-only --auto-patch 2>/dev/null || true + RTK_TELEMETRY_DISABLED=1 timeout 10 rtk init -g --hook-only --auto-patch 2>/dev/null || true fi # ── agent-browser skill ───────────────────────────────────────────────────── diff --git a/ralphex-fe/init-docker.sh b/ralphex-fe/init-docker.sh index 8e809cc..3437245 100755 --- a/ralphex-fe/init-docker.sh +++ b/ralphex-fe/init-docker.sh @@ -31,8 +31,11 @@ if [ -d /mnt/claude ]; then # ── RTK: ensure rewrite hook is configured ───────────────────────────── # Host mount usually brings the hook, but init idempotently to cover # standalone usage (no host mount). --hook-only avoids workspace artifacts. + # WORKAROUND: RTK ≥0.36.0 added a GDPR telemetry consent prompt that hangs + # in non-interactive environments. Remove when upstream fixes it: + # https://github.com/rtk-ai/rtk/issues/1307 if command -v rtk >/dev/null 2>&1; then - gosu app rtk init -g --hook-only --auto-patch 2>/dev/null || true + RTK_TELEMETRY_DISABLED=1 gosu app timeout 10 rtk init -g --hook-only --auto-patch 2>/dev/null || true fi fi