rtk-ai/rtk

npx fallback commands can hang on first run waiting for approval

Open

#739 aperta il 19 mar 2026

Vedi su GitHub
 (2 commenti) (1 reazione) (1 assegnatario)Rust (2914 fork)batch import
area:clibugeffort-smallgood first issuepriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

Summary

Plain npx fallback paths can block on first-run approval prompts when the underlying tool is not installed globally. In practice this can make RTK commands appear to hang or time out even though the underlying issue is an interactive npx confirmation.

Affected commands

  • rtk cc-economics via ccusage
  • rtk tsc
  • rtk next
  • rtk prisma
  • rtk npx prisma ...

Reproduction

  1. Use an environment where npx is available but the fallback tool is not installed globally.
  2. Run a command that falls back to plain npx <tool> ....
  3. Observe that the process may wait for first-run approval instead of returning normally.

Example cases:

rtk cc-economics
rtk tsc -- --version
rtk next -- --help
rtk prisma generate
rtk npx prisma --version

Actual behavior

RTK can appear to hang or time out because npx is waiting for interactive approval before installing/running the package.

Expected behavior

Install-capable npx fallback paths should run non-interactively so RTK either executes the tool or fails fast with a real error.

Impact

This is especially visible with ccusage, where first-run npx ccusage can make workflows such as cargo test --all appear to stall or time out.

Proposed fix

Use npx -y for install-capable fallback paths while leaving npx --no-install call sites unchanged.

Guida contributor