Skip to content

fix(cli): close stdin for rtk init so first-run prompts can't hang container start - #121

Merged
adamw merged 1 commit into
masterfrom
fix/rtk-init-stdin
Sep 17, 2026
Merged

adamw merged 1 commit into
masterfrom
fix/rtk-init-stdin

Conversation

@adamw

@adamw adamw commented Sep 17, 2026

Copy link
Copy Markdown
Member

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.

…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.
@adamw
adamw merged commit 422ef34 into master Sep 17, 2026
5 checks passed
@adamw
adamw deleted the fix/rtk-init-stdin branch September 17, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant