Spike: a search-first reading layer (#16549)
Status: step 1 (measure) was attempted and stopped. No product change, no index, no external engine. Nothing below is estimated; each figure says where it came from.
What was measured
The 30 most recent finished crew agent runs on this forge (read through GET /api/v1/repos/trevato/forge/runs and each run's /log, by a run that may read only what the API serves). Talk conversations were not measured: their history is not served to a crew run.
| Per 30 runs | Total | Per run, median |
|---|---|---|
Input tokens (tokensIn) | 5,707,047 | 125,357 (min 31,388, max 1,269,747) |
| Output tokens | 77,177 | |
| Wall seconds | 1,411 | |
| Tool calls the log lists | 146 |
The log lists calls by kind: Bash 117, Write 20, Grep 5, Edit 2, Read 1, and 1 logged as lowercase bash (146 in all). The 117 Bash calls, sorted by their command line, are 44 finding (grep, find, ls), 3 reading (cat, head, sed -n) and 70 running something (tests, curl, git). Adding the 5 Grep calls gives 49 finding, 4 reading in all.
What this does and does not say
- Share spent finding versus reading, in tokens: not measurable. The run record keeps tokens per run, never per tool call, and the log keeps the call line, not its result size or its seconds. Any split would be an estimate, which the issue forbids.
- Share in calls: finding is about a third of the listed calls (49 of 146, Grep and Bash together). That is a count of calls, not of tokens; a grep that returns a page costs more than ten that return a line.
- Reads are under-logged: one
Readin 30 runs is not credible next to 20Writes; the log likely omits some read calls, so the read share is not known either. - Input tokens per run vary forty-fold (31,388 to 1,269,747), which the call counts alone do not explain; why is not measured here.
Verdict per step
- Measure: not completed. The gap is the instrument, not the idea: there is nothing to base a "finding versus reading" share on.
- Ranked passages, batch form, per-run counter: not built. The counter is the right first change, because it is the missing instrument: record, per tool call, the bytes returned and the seconds taken, on the run, "counted, not estimated". Without it, step 2's savings cannot be shown, so it is built before the passage and batch forms, not after. It is a change to the run log and the MCP's tool wrapper, and deserves its own pull.
- A ranked index: no, not on this evidence. Nothing here shows a gap an index would close. The step's guards stand if it is reopened: derived from git and rebuildable, read only what the asker may read (the rule
searchkeeps), and any external engine run in a sandbox with no credentials, never on the production host, pinned by checksum and never installed from a piped script. xerj's own numbers are its claims, not ours.
Next
One pull: per-call result bytes and seconds in the run log, summed on the run page. Then re-run step 1 on 30 runs and Talk questions with it.