rtk-ai/rtk
View on GitHub`rtk init` hangs in non-interactive environments (v0.36.0 telemetry consent gate)
Open
#1307 opened on Apr 14, 2026
bugeffort-smallgood first issueresolved-pending-close
Description
Description
rtk init -g --hook-only --auto-patch hangs indefinitely in non-interactive environments
(Docker/devcontainer builds, CI) since v0.36.0. The hook setup completes and output is printed,
but the process never exits — it blocks waiting for stdin on the telemetry consent prompt.
Reproduction
# In any non-interactive context (Dockerfile, devcontainer postCreateCommand, CI):
rtk init -g --hook-only --auto-patch
# Process prints hook setup output, then hangs forever
Last visible output before hang:
RTK hook already up to date (hook-only mode).
Hook: /home/node/.claude/hooks/rtk-rewrite.sh
Note: No RTK.md created. Claude won't know about meta commands (gain, discover, proxy).
settings.json: hook already present
Restart Claude Code. Test with: git status
Expected behavior
rtk init should detect non-interactive environments (e.g., ! -t 0 / no TTY on stdin) and skip
the consent prompt, or respect RTK_TELEMETRY_DISABLED=1 to suppress it entirely.
Actual behavior
The process blocks on stdin waiting for consent input that will never come.
RTK_TELEMETRY_DISABLED=1 does not prevent the prompt — it only disables data collection after
consent is given.
Workaround
RTK_TELEMETRY_DISABLED=1 timeout 10 rtk init -g --hook-only --auto-patch 2>/dev/null || true
Environment
- RTK: v0.36.0 (v0.35.0 worked fine)
- OS: Debian Trixie (Docker container,
node:24-trixie-slim) - Arch: ARM64 (Apple Silicon via Docker Desktop)
- Context: devcontainer
postCreateCommand(no TTY)