Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .devcontainer/init-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions claude-code/.devcontainer/init-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions ralphex-fe/init-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down