You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 8, 2026. It is now read-only.
Add a first-class search (or grep) workspace tool. Today the model execs rg/grep, which dumps unbounded shell output into the turn and is the usual way it “finds” code.
This is a product / tool-surface issue, not agent-session (#548). It will help context later; ship it as a sandbox tool with a hard hit cap.
Why
Peer harnesses (Orrery et al.) keep search in the prefix: one small schema, bounded hits (path, line, text), no shell. Their in-process WalkDir is a bad impl (reads every file, glob is basename-only). We already have rg in the jail — call it argv-only with a max-results cap.
Plan filed: #717 — plan: first-class search tool (capped rg), stop exec-ing grep. Single-issue plan (one new search sandbox tool in lib/agent/tools.ts, argv-only rg, hard hit caps, read-grant-only, no Wasm/bridge change), with a Caps table and docs/ update plan. Next: plan-review on #717, then implement-plan.
Summary
Add a first-class
search(orgrep) workspace tool. Today the modelexecsrg/grep, which dumps unbounded shell output into the turn and is the usual way it “finds” code.This is a product / tool-surface issue, not agent-session (#548). It will help context later; ship it as a sandbox tool with a hard hit cap.
Why
Peer harnesses (Orrery et al.) keep search in the prefix: one small schema, bounded hits (
path,line,text), no shell. Their in-processWalkDiris a bad impl (reads every file, glob is basename-only). We already havergin the jail — call it argv-only with a max-results cap.Goal
search(name bikeshed in plan)pattern, optionalglob/path,max_results(server-capped)rg(or equivalent) argv, neversh -lc{path, line, text}+ “truncated, N more” if hit capcreate-plantableSuccess: the model stops
exec rgfor ordinary “where is X?”;execstays for real commands.Constraints
read_file(resolvePathForTool).filepath.Match(base)glob.Non-goals
execRelated
lib/agent/tools.ts— no search today (pwd/change_dir/list_dir/read_file/write_file/str_replace/exec)exec rgis still short)read_file(jump to a hit)Suggested next
create-planwith Caps table (max hits, max bytes, timeout).