Open-source light-tools: Lossless Agent Toolset Filters 84% of Context Tokens
Select-Lifeguard-658 · reddit · 2026-08-24
The author released light-tools, an open-source set of file, shell, and SSH tools designed specifically for AI agents to address context budget constraints. Unlike traditional tools that compress or drop tokens, light-tools employs a lossless strategy:
- Windowed Reads: Large files are loaded by page with a [CONTINUE] cursor, preventing the model from exhausting its context on a single read.
- Persistent Output: Command outputs are spilled to indexed files for later grep or pagination, rather than being dumped all at once.
- Smart Deduplication: Re-reads are skipped based on content hash; full content is only fetched if the file has changed.
- Round-trip Verification: Compressed data is verified against the original to ensure structural equality.
The tools also handle common model errors at the binary level (e.g., typo repairs, type coercion) and implement safety snapshots for dangerous commands like rm. Telemetry from 319k tool calls shows 84% of tokens were filtered and never entered the context. The project is GPL-3.0 licensed and supports MCP and stdio.
More from coding & agent
- Obsidian's Smart Chat saves AI thread links and status back into your notes — AINewsletter · 2026-08-24
- Vibe coding feels faster until your project grows and you can't understand its history — Warm-Reaction-456 · 2026-08-24
- We gave agents real email addresses and broke deliverability, threading, and privacy — saltexx · 2026-08-24
- Same model, different coding agent: harness choice swings scores from 10/10 to 0/10 — oliver-zehentleitner · 2026-08-24
- Practitioner advice: don't use LLM time savings to produce more mediocre code — tokenbender · 2026-08-24
- Dan Luu: there's no reason for software to be slow anymore — LLMs democratize perf work — tokenbender · 2026-08-24