Playwright parser fails outright, `rtk find` errors instead of passing through, eval path breaks on bare `===`, and `cc-economics` cannot parse current ccusage (evidence from 28k command corpus)
Version: rtk 0.43.0 (behavior confirmed on 0.34.2 and 0.43.0), macOS 26.4 arm64, zsh, Claude Code hook v3
First: thanks for rtk. Over 50,377 commands it reports 157.6M tokens saved at 85.3%. The issues below are the residue, measured from 2,787 Claude Code session transcripts (28,236 Bash calls, 31 days).
1. Playwright parser fails 100% of the time (96/96 runs)
Every playwright invocation in the corpus produced:
[RTK:PASSTHROUGH] playwright parser: All parsing tiers failed
followed by the raw JSON dumped anyway - so it is worse than no rtk: zero savings plus a banner plus, in 41 cases, a tee-log pointer forcing a second round trip.
Notably 90 of the 96 already passed --reporter=list, so this is not a "user forced the JSON reporter" case. It looks like rtk injects its own reporter and then cannot parse its own output. Repro shape:
TEST_REPORT_ID=abc PLAYWRIGHT_BASE_URL="https://example.app" npx playwright test tests/e2e/foo.spec.ts --reporter=list 2>&1
Suggested fix: when all parsing tiers fail, fall back to native output rather than the injected-reporter output, and drop the tee indirection on failure.
2. rtk find errors on compound predicates instead of passing through
$ rtk find . -name "seed-users*" -not -path "*/node_modules/*"
rtk: rtk find does not support compound predicates or actions (e.g. -not, -exec). Use `find` directly.
$ echo $?
1
Since the hook has already rewritten the command, the user's find never runs - the turn is simply lost (14 events). The registry knows at rewrite time that the command contains -not/-exec; it should return the no-equivalent exit code so the hook passes it through unchanged, rather than rewriting into a command that is guaranteed to fail.
3. eval path breaks on bare === under zsh (EQUALS expansion)
$ rtk proxy git diff --stat; echo ===
(eval):1: == not found
zsh's EQUALS option expands =word to the path of command word, so a bare === separator - an extremely common LLM-authored idiom - dies inside rtk's eval. 30 events. Quoting (echo "===") works, but callers cannot be expected to know this. Suggest unsetopt equals (or emulate -L sh) around the eval, or invoking via sh -c.
4. Low compression on the two highest-volume commands
| Command | Count | Saved | Avg % |
|---|---|---|---|
| rtk read | 4,666 | 133.4M | 28.3% |
| rtk grep | 7,233 | 3.5M | 16.0% |
| rtk ls | 13,159 | 3.4M | 67.8% |
| rtk vitest run | 130 | 1.3M | 93.4% |
| rtk git commit | 718 | 970K | 83.0% |
| rtk:toml ps aux | 97 | 4.8M | 98.1% |
rtk read still delivers the largest absolute saving, so 28.3% is defensible. rtk grep at 16.0% across 7,233 calls is the outlier - the most-invoked filter is close to a no-op. Is that expected, or is grep output already near-minimal by the time rtk sees it? Happy to share anonymized rtk gain --history output.
5. rtk cc-economics cannot parse ccusage >= 20.x (renamed field)
$ rtk cc-economics
rtk: Failed to fetch ccusage monthly data: Failed to parse ccusage JSON output:
Invalid JSON structure for monthly data: missing field `month` at line 30 column 5
ccusage 20.0.14 emits period, not month:
$ ccusage monthly --json | jq '.monthly[0] | keys'
["agent","cacheCreationTokens","cacheReadTokens","inputTokens","metadata",
"modelBreakdowns","modelsUsed","outputTokens","period","totalCost","totalTokens"]
So the deserializer's month field no longer exists upstream and the whole subcommand is dead against any current ccusage. This is the one subcommand that answers "what did rtk actually save me in dollars", so it is the one users reach for after seeing rtk gain.
Suggested fix: accept either key (#[serde(alias = "period")]), and treat an unknown-schema ccusage as a soft warning rather than aborting the subcommand.
Versions: rtk 0.43.0, ccusage 20.0.14.
wshm ยท Automated triage by AI
๐ Automated Triage
| ๐ Category | bug |
| ๐ Priority | high |
| ๐ฏ Confidence | 88% |
Summary
Bundled report of four distinct rtk bugs (Playwright parser 100% failure with raw JSON dump instead of native fallback, rtk find hard-erroring on -not/-exec instead of pass-through causing lost turns, zsh eval crashing on bare === due to EQUALS expansion, and cc-economics breaking on ccusage>=20.x's month->period field rename) plus a data question about low rtk grep compression โ recommend splitting into separate tracked issues and fixing each independently.
๐ Relevant files
src/parsers/playwright.rssrc/commands/find.rssrc/proxy/eval.rssrc/cc_economics.rs
Triaged automatically by wshm ยท This is an automated analysis, not a human review.
Status on v1.2.1: item 2 is fixed (rtk find runs -not -path ... and -exec forms), and so is item 5 (rtk's ccusage parser accepts the period field next to date). Item 3 is zsh's own = expansion of a bare echo ===, which rtk leaves untouched, and item 4 was a question. What remains is item 1: rtk playwright test replaces --reporter=list with its own JSON reporter, and when any non-JSON line reaches stdout it prints the cut JSON instead of the native output. Narrowing this issue to item 1.