release notes · v0.8.0
skylakegrep 0.8.0 — Token-lean agent loop
0.8.0 makes the agent path cheaper without giving up completion. Agent
presets now return compact JSON, a new --agent-slim preset and
skygrep symbols command let an agent read only the line ranges that
matter, and an indexing bug that could leave a project silently without
embeddings is fixed.
Why
Measured against an agent that truncates tool output, the 0.7.x agent loop did not save tokens. In the 2026-08-15 General Benchmark v2 receipt:
- 77% of
skygrep-firsttokens were spent after the correct file was already in context. - 70% went to one step that read the symbol inventories of 50–160 files at once (median ~60k tokens).
- The
rg-onlybaseline let--max-countapply per file, so common terms returned most of a repository (median 13.8M tokens per Spring task). The 18× headline therefore measures savings against an unbounded dump.
What changed
- Compact agent JSON.
--agent-fast,--agent-contextand the MCPagent_contexttool return single-line JSON with paths relative to the current directory, no duplicatedevidence_bundle/why_ranked/supporting_chunksblocks, and snippets trimmed to the declaration plus the lines that mention the query (--snippet-budget, default 1,200 characters). The keys agents read are unchanged:path,start_line,end_line,score,confidence,evidence_terms,agent_summary,strict_verification. On the same Django query,--agent-fastwent from 3,331 to 508 tokens and--agent-contextfrom 9,297 to 2,700. --format auto|compact|full. Agent presets default to compact; plain--jsonand--format fullkeep the 0.7.x shape.--agent-slim.--agent-fastretrieval plus a query-rankedline: declarationoutline of the top 3 source files and anextcommand for the following batch.skygrep symbols FILE... -q QUERY. Model-free outline of a few files: imports skipped, plain lines only when they mention two or more query concepts,--budgetper file, opt-in--expand Kto inline the first 30 lines of the best-matching declarations. Also exposed as the MCP toolsymbols.- MCP tool text is no longer pretty-printed. The text block is what the model reads; indentation was pure overhead.
- Agent guidance v6.
skygrep setupteaches the progressive loop (slim → read the range →symbolson the next batch → follow-up probe) and the managed snippet shrinks from about 1,660 to about 560 tokens per agent session. Existing registrations refresh automatically. - Index fix: chunks embedded while the model was unreachable. The
embedder substitutes zero vectors when Ollama is down, and they used to be
stored with the file's real mtime, so neither
skygrep index .nor the per-search refresh re-embedded them anddoctorreported the index as healthy. They are now stored with an mtime sentinel, staleness checks use the minimum chunk mtime, anddoctorreports unembedded chunks with the repair command. - Benchmark policies.
skygrep-slim(the progressive loop, with the fullskygrep-firstpolicy as a last-resort fallback) andrg-agent(a realistic ripgrep agent: per-termrg -ccapped at 250 visible lines, BM25-style ranking, the same outline reader, reads capped at 2,000 lines), plusbenchmarks/compare_policies.pyfor paired comparisons.
Compatibility
- Agent JSON shape changed. Tools that parsed
evidence_bundle,why_ranked,language,candidate_recall_lanesor absolute paths from--agent-fast/--agent-contextshould pass--format full. - Still Python 3.9+, Apache-2.0, fully offline. Existing indexes keep
working; chunks stored without embeddings are re-embedded on the next
skygrep index .once Ollama is reachable.
Measurements
A smoke run on the 60 pinned General Benchmark v2 tasks (1 trial, chars/4
token counting). The run environment could not download bge-m3, so
embeddings came from a deterministic stand-in served on the Ollama API: the
semantic lane is noise for both skygrep policies. This is a regression check,
not a published receipt.
| policy | gate passed | median tokens | total tokens | median calls |
|---|---|---|---|---|
| skygrep-first | 60/60 | 52,751 | 3,474,615 | 14 |
| skygrep-slim | 60/60 | 8,358 | 1,425,866 | 10 |
| rg-agent | 46/60 | 14,778 | 1,587,936 | 8 |
skygrep-slimmatchedskygrep-firstcompletion with a 4.4× lower median and 2.4× lower total.- Against
rg-agentit completed 14 more tasks. On the 46 both complete, its median was 1.31× lower, but its total was higher (ratio 0.75×) because the 5 tasks that fall back to the full policy dominate the sum.
Known follow-ups
- Publish a
bge-m3receipt forskygrep-slim/rg-agentwith three trials and--tokenizer tiktokenunderbenchmarks/reports/. - Make the last-resort fallback progressive end to end so the 5 fallback tasks stop dominating total tokens.
- Revisit the README hero numbers ("30 / 30" recall, "~1 s" warm queries) against the current receipt.