fix: polish native tool descriptions for discoverability and turn efficiency - #178
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 2914334 | Commit Preview URL Branch Preview URL |
Sep 03 2026, 06:41 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adversarial polish of the native tool descriptions — the strings injected into every LLM turn as tool schemas. Three sequential review sub-agents (discoverability, token-economy, behavioral accuracy; 5 validated findings each), findings applied centrally, then a fourth verification sub-agent audited the final diff: CLEAN, 0 defects.
Highlights (15 findings applied across 12 files)
Turn-efficiency routing
shell: steering fixed — file inspection now points at zero-fork tools (read_file/glob/tree); long-running work (builds, full test suites, dev servers) routed tobg_startinstead of the timeout dead-end.bg_start's use-list gains builds/test suites.batch_patch: trigger-first phrasing — prefer over N sequentialpatchcalls; same-file multi-edits stated explicitly.search_files: cross-reference tomulti_grepfor multi-pattern sweeps.memory: cross-pointer tosession_searchfor past-session content (kills the memory-vs-session-search confusion).web_search: no longer dead-ends intohttp_batchfor content (bodies are metadata-only) — browser only.Factual corrections (description vs code drift)
browser: description named nonexistent tools (browser_navigate/browser_snapshot/browser_click) — models following it emitted wrong tool names; replaced with the real action flow.session_search: "semantic vector search" → "thresholded keyword scoring" (code is explicitly bag-of-words + 0.40 threshold); adds use-distinctive-terms guidance.delegate_tasksartifacts: "Text artifacts up to 32 KB are inlined in full" → "Only text/* artifacts ≤32 KB are inlined (JSON/binary are metadata-only)" — matches the actualtext/*gate and 128 KiB/call inline budget.bg_status:unknownnow also documented as "finished record evicted" (oldest jobs pruned past the per-session cap) — prevents re-running completed work.bg_start: completion notices drain into a later iteration, not instantly — poll before ending dependent turns.transcribe: native formats are WAV/MP3/FLAC (others auto-converted via ffmpeg) — both description and schema param.vision: video analysis requires ffmpeg+ffprobe in PATH — convert/extract-frames instead of blind retries.Token economy
delegate_tasksdescription trimmed ~30% (config-key spellings, trust formalism, defaults narration) while keeping every operative rule: approvals/denials, budgets, trust non-increase, depth cap, artifact contract.multi_grep("Directly targets the multi_search benchmark").Verification
maxBatchPatches=10,subagentHeadlineMaxRunes=2048,pruneLockedeviction,text/*inline gate).go build,go vet, fullcmd/odek+internal/memorysuites green (-count=1); no test pinned the old strings.Follow-up (out of scope here)
The
browsertool's runtime jsonError strings still reference the phantombrowser_navigatename (browser_tool.go:282,303) — code-side strings, needs its own fix.