feat: token efficiency — remove 4 shell-duplicate tools, trim tool descriptions - #234
Merged
Conversation
… dedupe perf-tool boilerplate, trim top tool descriptions Removals (pure shell duplicates per expert-panel analysis; file_info/read_file cover counting needs): - tr, sort, count_lines, word_count tools + registrations + tests - internal taint/read classification maps intentionally RETAIN removed tool names so persisted past-session tool calls keep their original taint class Descriptions: - shell, batch_read, browser, session_search, bg_start, diff, multi_grep, math_eval, checksum trimmed of redundant boilerplate - one dedupe line in the system prompt covers the perf-tool zero-fork rationale Measured: tool schemas 26,645 → 21,892 chars (~6,700 → ~5,470 tok/call); fixed per-call overhead (tools + system prompt) down ~1,100 tokens. Docs updated in same change (AGENTS.md, CHEATSHEET, MCP, SECURITY, TOOL_SELECTION, WEBUI).
…les.template.json, renumber perf_tools sections, document legacy toolviews cases
…row from CHEATSHEET
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 5f29f7e | Commit Preview URL Branch Preview URL |
Sep 13 2026, 04:34 PM |
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
Token-efficiency change from the investigation (expert panel + 3 sequential adversarial reviews + expert judge, verdict SHIP). Consolidated single feature PR: tool removals + description optimization + docs.
What changed
Tool removals (pure shell duplicates;
file_info/read_file/shellcover their use cases):tr,sort,count_lines,word_count— types, registrations, sandbox bindings, testsinternal/memory/provenance.go,internal/danger/approver.go, loopargssummary/reconcile/effects) deliberately retain the removed names so persisted past-session tool calls keep their original taint classification (verified fail-safe: a hypothetical future tool with a colliding name would only get more tainting, never less)Description optimization (9 tools trimmed: shell, batch_read, browser, session_search, bg_start, diff, multi_grep, math_eval, checksum) + one perf-tool dedupe paragraph in the system prompt Tool-naming section replacing per-tool zero-fork boilerplate. Pinned contracts respected (
Risk classes, wake-on-complete guidance).Docs — AGENTS.md, CHEATSHEET, MCP, SECURITY, TOOL_SELECTION, WEBUI, MIGRATION (new removal section with replacements per tool), profiles.template.json cleaned.
Measured impact
8,200 tok (**−1,100 tok/call**)Compatibility
odek continueon old sessions with removed-tool calls: registry returnstool not found, model recovers (verified)tools/listderives from the live registry — removed tools drop out automaticallyReview
Test evidence
go test ./internal/...— all 30 packages okcmd/odeknon-interactive subset (all touched areas incl. pillar/ingest/MCP/session/registry) — ok/dev/tty-dependent tests not runnable locally (known environmental blocker, same on main); CI runs them authoritatively