diff --git a/.devcontainer/init-plugins.sh b/.devcontainer/init-plugins.sh index a4478b5..2aad0d9 100755 --- a/.devcontainer/init-plugins.sh +++ b/.devcontainer/init-plugins.sh @@ -46,9 +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 +# RTK_TELEMETRY_DISABLED=1 is the supported opt-out, not a workaround: since +# rtk-ai/rtk#2477 (v0.44.0+) it short-circuits the telemetry consent prompt that +# would otherwise block on stdin here. rtk's own TTY check is not enough — a +# devcontainer postCreateCommand gets a pseudo-TTY, so the prompt believes it is +# interactive. timeout stays as a backstop against a future init-time hang. echo "Initializing rtk (token optimizer)..." 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 272109c..8a3ed14 100644 --- a/claude-code/.devcontainer/init-plugins.sh +++ b/claude-code/.devcontainer/init-plugins.sh @@ -70,9 +70,11 @@ done # ── 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 +# RTK_TELEMETRY_DISABLED=1 is the supported opt-out, not a workaround: since +# rtk-ai/rtk#2477 (v0.44.0+) it short-circuits the telemetry consent prompt that +# would otherwise block on stdin here. rtk's own TTY check is not enough — a +# devcontainer postCreateCommand gets a pseudo-TTY, so the prompt believes it is +# interactive. timeout stays as a backstop against a future init-time hang. if command -v rtk &>/dev/null; then RTK_TELEMETRY_DISABLED=1 timeout 10 rtk init -g --hook-only --auto-patch 2>/dev/null || true fi diff --git a/ralphex-fe/init-docker.sh b/ralphex-fe/init-docker.sh index 3437245..7b2cbc4 100755 --- a/ralphex-fe/init-docker.sh +++ b/ralphex-fe/init-docker.sh @@ -29,11 +29,14 @@ if [ -d /mnt/claude ]; then chown -R app:app /home/app/.claude # ── 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 + # The host mount usually brings the hook; re-init idempotently in case the + # mounted ~/.claude carries none. --hook-only avoids workspace artifacts. + # Scope: this sits inside the /mnt/claude guard, so a container started + # without the host mount gets no rtk hook and rtk stays inert. + # RTK_TELEMETRY_DISABLED=1 is the supported opt-out, not a workaround: + # since rtk-ai/rtk#2477 (v0.44.0+) it short-circuits the telemetry consent + # prompt that would otherwise block on stdin here. timeout stays as a + # backstop against a future init-time hang. if command -v rtk >/dev/null 2>&1; then RTK_TELEMETRY_DISABLED=1 gosu app timeout 10 rtk init -g --hook-only --auto-patch 2>/dev/null || true fi