Summary
Three subcommands fail identically with [rtk: No such file or directory (os error 2)] immediately upon invocation. The symptom is the same; the root cause is almost certainly a shared argument-parsing/file-lookup defect.
Environment
- rtk 0.42.0 (Homebrew, installed 2026-05-24)
- macOS Darwin 24.6.0 (x86_64)
- zsh 5.9
rtk verify reports 145/145 inline tests passed and hook integrity OK
Bug A: rtk json rejects stdin input
$ echo '{"a":1,"b":2}' | rtk json
[rtk: No such file or directory (os error 2)]
Expected: Compact-format the JSON read from stdin (per rtk help json).
Actual: ENOENT, apparently because the wrapper requires a file argument and never falls back to stdin.
Workaround: pass a file path arg (rtk json file.json). Loses the pipe use case (e.g., kubectl get -o json | rtk json).
Bug B: rtk smart <cmd> errors with ENOENT
$ rtk smart cat /Users/master/.claude/RTK.md
[rtk: No such file or directory (os error 2)]
Expected: Run the inner command and emit a 2-line heuristic summary (per rtk help smart).
Actual: ENOENT before the inner command runs. Looks like the wrapper resolves cat as a file path rather than as a command to wrap.
Workaround: use rtk summary <cmd> — that wrapper works as expected.
Bug C: rtk telemetry returns ENOENT
$ rtk telemetry
[rtk: No such file or directory (os error 2)]
Expected: Show telemetry consent state, allow opt-in/opt-out (per rtk help telemetry: "Manage telemetry consent and data (RGPD/GDPR)").
Actual: ENOENT immediately.
Note: the [telemetry] section IS readable via rtk config (default enabled=false, consent_given=false), so the underlying state mechanism works — only the dedicated subcommand is broken.
Workaround: edit ~/Library/Application Support/rtk/config.toml under [telemetry] directly.
Hypothesis: shared root cause
All three commands fail with the same errno-2 message at the exact same point (before any subcommand-specific logic runs). Suggests a shared arg-parsing/file-lookup helper that's mistakenly treating the first positional argument (or implied input source) as a file path. Fixing one will likely fix all three.
Validation status
rtk help json, rtk help smart, rtk help telemetry all return successfully — the subcommands ARE registered in the help system. Only the runtime path fails. Other subcommands (rtk ls, rtk wc, rtk grep, rtk find, rtk git, rtk env, rtk read, rtk diff, rtk gh, rtk docker, rtk kubectl, rtk go, rtk gain, rtk session, rtk learn, rtk discover, rtk verify, rtk rewrite, rtk hook-audit, rtk config) all work correctly on this same setup.
Summary
Three subcommands fail identically with
[rtk: No such file or directory (os error 2)]immediately upon invocation. The symptom is the same; the root cause is almost certainly a shared argument-parsing/file-lookup defect.Environment
rtk verifyreports 145/145 inline tests passed and hook integrity OKBug A:
rtk jsonrejects stdin inputExpected: Compact-format the JSON read from stdin (per
rtk help json).Actual: ENOENT, apparently because the wrapper requires a file argument and never falls back to stdin.
Workaround: pass a file path arg (
rtk json file.json). Loses the pipe use case (e.g.,kubectl get -o json | rtk json).Bug B:
rtk smart <cmd>errors with ENOENTExpected: Run the inner command and emit a 2-line heuristic summary (per
rtk help smart).Actual: ENOENT before the inner command runs. Looks like the wrapper resolves
catas a file path rather than as a command to wrap.Workaround: use
rtk summary <cmd>— that wrapper works as expected.Bug C:
rtk telemetryreturns ENOENTExpected: Show telemetry consent state, allow opt-in/opt-out (per
rtk help telemetry: "Manage telemetry consent and data (RGPD/GDPR)").Actual: ENOENT immediately.
Note: the
[telemetry]section IS readable viartk config(defaultenabled=false,consent_given=false), so the underlying state mechanism works — only the dedicated subcommand is broken.Workaround: edit
~/Library/Application Support/rtk/config.tomlunder[telemetry]directly.Hypothesis: shared root cause
All three commands fail with the same errno-2 message at the exact same point (before any subcommand-specific logic runs). Suggests a shared arg-parsing/file-lookup helper that's mistakenly treating the first positional argument (or implied input source) as a file path. Fixing one will likely fix all three.
Validation status
rtk help json,rtk help smart,rtk help telemetryall return successfully — the subcommands ARE registered in the help system. Only the runtime path fails. Other subcommands (rtk ls,rtk wc,rtk grep,rtk find,rtk git,rtk env,rtk read,rtk diff,rtk gh,rtk docker,rtk kubectl,rtk go,rtk gain,rtk session,rtk learn,rtk discover,rtk verify,rtk rewrite,rtk hook-audit,rtk config) all work correctly on this same setup.