fix(cli): close stdin for rtk init so first-run prompts can't hang container start - #121
Merged
Merged
Conversation
…ntainer start rtk 0.45 asks for telemetry consent on first init. The init scripts send rtk's output to /dev/null but left stdin on the container TTY, so the question was invisible and startup blocked forever. Applies to the claude, cursor and codex variants.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Starting a sandbox hangs right after `Imported mitmproxy CA into Java trust store`. The container is stuck in `rtk init`.
rtk 0.45 asks `Enable anonymous telemetry? [y/N]` on first init. Our init scripts discard rtk's stdout and stderr but leave stdin on the container TTY. The prompt is never shown, and rtk waits for an answer forever. `--auto-patch` does not cover this prompt.
Fix
Run every `rtk init` with `</dev/null`. Without a TTY on stdin, rtk skips the prompt (telemetry stays disabled) and exits at once. Applied to the claude, cursor and codex variants.
Verification
With rtk 0.45.0 under a fake TTY: the old command blocks until killed, the new one exits 0 and writes the hook. bats suites for rtk and agents pass.