You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproduced on macOS (Darwin 25.5.0) with rtk 0.38.0 — adding diagnostics since the original report is sparse.
Symptom: rtk ls <dir> always prints the literal placeholder (empty) (8 bytes, exit 0) regardless of directory contents. Not specific to -1; also reproduces with no flags, -la, and --ultra-compact.
Diagnostics:
rtk ls -vvv <dir> shows the filter receiving full native output and dropping everything: Chars: 1003 → 8 (100% reduction) followed by (empty).
rtk proxy ls <dir> (unfiltered) returns the correct 12 entries, matching /bin/ls.
Other filters are fine (rtk find works), so this is isolated to the ls output filter.
rtk gain --history shows many ls ... -100% entries, i.e. the filter has been silently discarding all entries for a while.
Impact: when used via the Claude Code hook (ls auto-rewritten to rtk ls), agents see existing directories as empty and misdiagnose.
Workaround: add ls to [hooks] exclude_commands in config.toml (confirmed working), or use rtk proxy ls.
Suspected BSD ls output parsing (multi-column format on macOS), but the binary is closed so I couldn't confirm. Happy to run more diagnostics if useful.
This was fixed in v0.39.0: rtk ls no longer parses the localized/unrecognized listing into nothing, and falls back to raw output when it cannot parse. Running rtk ls -1 <dir>, rtk ls <dir> and rtk ls -la <dir> on the current build lists the real entries instead of (empty). Please reopen or comment if you still see it on the latest version.
Activity
[-]`rtk ls -1 path/` Return `(empty)`[/-][+]`rtk ls -1 path/` Always Return `(empty)`[/+]refactor(ls): extract build_ls_args from run()
fix(ls): strip display-format flags that conflict with -la (rtk-ai#2058)
test(ls): expand build_ls_args coverage for rtk-ai#2058
pszymkowiak commentedon May 27, 2026
🔍 Automated Triage
bugmediumSummary
The
rtk ls -1flag is broken — always returns empty output instead of listing files; PR #2061 is already open to fix it.Triaged automatically by wshm · This is an automated analysis, not a human review.
CHHC-L commentedon Jun 30, 2026
seems that we have fix pr #2061 but no one approves it ;(
tatsuki-washimi commentedon Jul 7, 2026
rtk 0.37.2でも同様の事象を確認しました(ai-harnessリポジトリルートで検証):
実際には docs/ 以下に6ファイルが存在します(
rtk proxy ls docsで確認済み)。回避策として、
ls/findを hook の書き換え対象から除外しています([hooks] exclude_commands)。同じ事象は #2271 でも報告されているようです。kento-miyazaki commentedon Jul 13, 2026
Reproduced on macOS (Darwin 25.5.0) with rtk 0.38.0 — adding diagnostics since the original report is sparse.
Symptom:
rtk ls <dir>always prints the literal placeholder(empty)(8 bytes, exit 0) regardless of directory contents. Not specific to-1; also reproduces with no flags,-la, and--ultra-compact.Diagnostics:
rtk ls -vvv <dir>shows the filter receiving full native output and dropping everything:Chars: 1003 → 8 (100% reduction)followed by(empty).rtk proxy ls <dir>(unfiltered) returns the correct 12 entries, matching/bin/ls.rtk findworks), so this is isolated to the ls output filter.rtk gain --historyshows manyls ... -100%entries, i.e. the filter has been silently discarding all entries for a while.Impact: when used via the Claude Code hook (
lsauto-rewritten tortk ls), agents see existing directories as empty and misdiagnose.Workaround: add
lsto[hooks] exclude_commandsin config.toml (confirmed working), or usertk proxy ls.Suspected BSD
lsoutput parsing (multi-column format on macOS), but the binary is closed so I couldn't confirm. Happy to run more diagnostics if useful.KuSh commentedon Sep 5, 2026
This was fixed in v0.39.0:
rtk lsno longer parses the localized/unrecognized listing into nothing, and falls back to raw output when it cannot parse. Runningrtk ls -1 <dir>,rtk ls <dir>andrtk ls -la <dir>on the current build lists the real entries instead of(empty). Please reopen or comment if you still see it on the latest version.