Repository navigation
Description
Summary
Request first-class rtk agent-browser support to compress output from agent-browser, a CLI browser automation tool used by Claude Code agents.
Why
agent-browser is a high-volume, high-token CLI in Claude Code workflows. In my last 30 days of sessions:
| Subcommand | Calls | Notes |
|---|---|---|
agent-browser eval |
356 | Returns arbitrary JS-evaluated JSON — frequently huge |
agent-browser navigate |
116 | Small status output |
agent-browser snapshot |
112 | Full DOM / accessibility tree — very large |
agent-browser click |
101 | Small status output |
agent-browser screenshot |
75 | Writes file, returns path |
agent-browser close |
44 | Tiny |
agent-browser set |
29 | Small |
| Total | 833 |
These currently bypass rtk entirely (no rewrite target), so all output enters the model context unfiltered.
eval and snapshot are the meaningful targets — both return structured payloads that compress well. The other subcommands return small fixed acknowledgments and don't need compression.
Suggested compression strategies
eval: detect JSON output, prune null fields, truncate long string values with `[…+N chars]` markers, collapse repeated array elements beyond N (similar to how `rtk grep` handles long match lines).snapshot: accessibility-tree output is hierarchical and repetitive. Collapse nodes with no semantic role/label, drop empty containers, keep interactive elements (`@eXX` refs) intact since downstream `click`/`fill` commands depend on them.navigate/click/close/set: pass-through or minimal trim.
Reference
Tool: https://www.npmjs.com/package/agent-browser (v0.26.0 tested)
Detected via `rtk discover --all`:
```
TOP UNHANDLED COMMANDS
agent-browser eval 356
agent-browser navigate 116
agent-browser snapshot 112
agent-browser click 101
agent-browser screenshot 75
agent-browser close 44
agent-browser set 29
```
Happy to share representative output samples if useful.
Activity
pszymkowiak commentedon May 27, 2026
Closing as duplicate of #2007. See the original issue for updates.