refactor(agent): replace read tool with mbtx file reads - #1359
Conversation
|
Holding this one. The direction is right — Evidence behind both halves of that, from an A/B on this branch. The removal itself does not cost artifact qualityFour runs building a TOML v1.0.0 parser from an empty module (2 per arm: this branch vs its merge-base),
All four produced a working parser and passed their own gates. n=2 per arm can't support a few points on a 73-point scale, and none of the parser bugs trace back to file reading: both baseline runs hit the same naive float conversion ( Wall clock did not separate the arms either. Three of four runs called What isn't readyThe prompt block is not being followed. Across both PR-arm runs, in 23 snippets that read a file:
That last one matters because it used to be free. The unbounded whole-file reads are the sharper risk, and the eval understates it: these runs worked in a fresh empty module with tiny files. In this repo, reading a whole Two smaller things in the same category: a Windows path pasted into a snippet is either a compile error ( Cost side, for completenessReads through Also worth noting the fixed overhead moved the wrong way: identical task and workspace, first request was 20,025 prompt tokens on base against 20,094 here. The 28-line block across five prompts costs slightly more than the tool schema it removes — which a library import would reverse. Plan
|
Agents currently have two ways to read files: the standalone
readtool andmbtx. Removereadfrom the main, worker, explore, review, and audit toolsets, and route file reads throughmbtx.Add a compact system-prompt example that selects an inclusive line range, uses an array comprehension to format original line numbers (
1 | ...), and prints each excerpt directly. File errors propagate normally, and selected lines are printed in full. Update skill and bundled-documentation instructions, generated prompts, registry expectations, and the eval harness. Keep the historical read-result decoder and renderer so saved transcripts still display correctly.Validation:
moon info && moon fmtjust checkjust test(native, JS, and offline CLI cases)just buildmbtxtool using a temporary test harness: numbered output, lines 80–119, empty files, past-EOF ranges, and missing-file error propagation passed. The temporary harness was removed after verification.