GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — [FEATURE]: Code Mode needs a token budget and a per-tool breakdown · Issue #58708 · anomalyco/opencode Open DescriptionI measured on my own machine before asking for anything. OpenCode v2.1.4, Linux, one MCP server with 207 tools.
Traditional tool calling injects every schema into every request, so this single server would spend 1.03M tokens before I type anything. That fits no 200k window and eats a 1M window whole. With Then I ran the same task twice in two real sessions on this machine. Fetch 8 URLs, report which ones fail or mention "token". Session A used one tool call per URL and returned each body whole. Session B ran one program that returned a filtered array. Same model, same day, billing read from
27.4x fewer tokens, 13.6x cheaper. The dollar gap is smaller than the token gap because the repeated prefix hits prompt cache. A also got 3 of the 8 answers wrong. Its bodies were truncated at 50k characters, which cut off the word "token" on three pages. B searched the full text inside the sandbox and got all 8 right. Truncating observations changed three answers and the price. A synthetic run of the same task counts 114,320 tokens for one call per URL against 2,436 for one program, 46.9x apart, and 24.5x apart once the prefix is priced at a 10% cache rate. That cost grows with N² because every observation is resent in every later request: at the 2,752-token average, 20 URLs cost 578k tokens and 50 cost 3.5M. None of this is news to Cloudflare or Anthropic. Kenton Varda and Sunil Pai published the same approach in September 2025 (https://blog.cloudflare.com/code-mode/), and Anthropic shipped programmatic tool calling in November 2025 with a reported 37% average drop on research tasks. OpenCode already ships the mechanism; a default policy and a per-tool breakdown are missing. I read #8625 (MCP search, shipped via #12520) and #53121 (per-step cost, open) before writing this. Both sit below what I am asking for. What I would like to see, and the questions behind each item1. A default for large MCP servers. Above roughly 20 tools, should 2. Per-tool and per-schema tokens. #53121 asks for per-step and per-turn cost. I want the split inside one step: system prompt, tool schemas, each tool observation, reasoning, output. Without it I cannot tell whether a session burned 40k on a page fetch or on 180 unused schemas. Is that already stored per message, and would a TUI view or an 3. Output caps that spill instead of truncate. 4. Does 5. Compaction accounting. One Code Mode step can hide 50 underlying calls. Does compaction weigh it as one message when it decides what to keep? If yes, a summary can throw away everything the program found. If no, large code steps can exceed 6. Sandbox and audit. My What I would like from the communityIf you run an MCP server with a lot of tools, please post three numbers: how many tools it exposes, what its I can turn the benchmark into Benchmark, raw numbers and both measurement scripts: https://gist.github.com/RicSchonfelder/268a51cb86395db36eaac0aa018686cd Reacted by Jakub Jirutka Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |