rtk-ai/rtk

fix: ls tracking baseline should compare against `ls` not `ls -la`

Open

#561 geöffnet am 13. März 2026

Auf GitHub ansehen
 (1 Kommentar) (4 Reaktionen) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:clibugeffort-smallfilter-qualitygood first issuepriority:medium

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Problem

rtk ls internally runs ls -la to get file metadata for grouping/filtering, then compresses the output. The savings % is tracked against the ls -la output, not plain ls (which is what the agent would have run without RTK).

This inflates the reported savings. Example from user report:

  • ls = 332 tokens
  • ls -la = 4173 tokens
  • rtk ls = 993 tokens
  • Reported: 76.2% savings (vs ls -la)
  • Actual: -199% vs plain ls

Fix

Track against the baseline command the agent would have run (ls), not the internal enriched command (ls -la).

In src/ls.rs line 113-118, change the tracking input from the ls -la raw output to a plain ls capture (or estimate).

Reference

https://www.reddit.com/r/ClaudeAI/comments/1rjkf9r/comment/oa3trnn/

Contributor Guide