Andrew Rivers, Aera Research
Most of an agent harness is a record of what earlier models could not do. Each tool definition, each paragraph of instruction, and each rule about which tool follows which was written because a model once needed it. The models improved, the harness stayed, and now it holds them back.
Between 2026-11-22 and 2026-11-29 we tested that claim on our own product. Aera is an agent that works in a person's own signed-in browser, on request and on a schedule. We took its tool list away. Every run now gets two tools: execute, which runs JavaScript in a sandbox where every capability is a function, and search_tools, which finds those functions and returns their signatures. No capability was removed at the switch; every tool stayed reachable from code.
In the two side-by-side comparisons we ran, the same tasks cost 36% and 55% of what they cost before. In the second comparison, a blind judge marked four outright failures in the old mode's ten chats and none in the new mode's. Both comparisons are small and changed several things at once, which we break down below.
One thing we cannot put a number on is daily feel: the agent is noticeably more capable and quicker than it was before the change. That is the judgement of the one person who uses it every day, and it is the reason we moved everything.
This is not a new idea, and the next section credits the people who had it first. What we can add is what happened when a product with a person watching it moved all the way over, because most of what broke had nothing to do with tokens.

Figure 1. What one request declares to the model, before and after. At the switch every tool stayed reachable; what changed is where it lives. The namespace counts are the size of the whole table, and one run sees a subset.
What was already known
Code as an action format predates today's function calling interfaces. Program-aided reasoning dates to 2022, and CodeAct measured code actions against JSON tool calls across 17 models in 2024. Cloudflare named the pattern Code Mode in September 2025. Its version turns a tool server into a typed API and lets the model write code against it in an isolate. Anthropic described code execution with MCP in November 2025 and shipped a tool search tool and programmatic tool calling, and other providers have followed.
The tradeoffs are documented too, in those sources and in the discussion around them. You need a real sandbox. Approving and logging each call gets harder when the calls sit inside a script. Models guess what a function returns. Anthropic's own documentation reports a benchmark of short sequential calls where scores did not move and cost rose by roughly 8%.
Almost all of that work measures coding tasks or API orchestration, and almost all of it reports tokens. We found little on the questions that took most of our time: what a person sees while a script runs, how a script should speak to them, what happens to plans and progress, and how a tool should be designed when its caller is a program. Those are what the lessons below are about.
What we changed
Before the change, a personal chat declared 25 tool definitions to the model and listed 106 more in a catalog it could load on request. Loading a tool changed the tools array, which threw away the provider's prompt cache for that request. In one workspace trial 36 of 426 requests did that. Freezing the array removed it (36 changes became 1, then 0 on a second round) and lowered the cost of a prompt token by about a fifth. That was the problem we set out to fix, and it does not need code execution at all.
We kept going because of what the script tool did to the work itself. The final design:
- Two declared tools.
executetakes a short description of the step, written for the person, and the body of an async function.search_toolstakes names or a plain-language query and returns each tool's description and a TypeScript signature. - Everything else is a function. The table holds 152 names in 21 namespaces, called as
tools.<namespace>.<verb>(args). A given run sees the part its role allows; a personal chat listed 85 on 2026-11-27. The namespace is the thing acted on, as a person would name it:browser,files,person,plan,schedule. - A scratchpad that keeps state. One QuickJS context per conversation, compiled to WebAssembly, with no network, filesystem, timers or modules of its own. A value assigned in one execution is there in the next.
- Standard
fetch(). The browser's network stack sends the request. It refuses addresses on the local machine and network, and it sends the person's cookies for a site only when the script asks. - Every call is still a call. A function called from a script goes through the same dispatch as a declared tool: the same permission check, the same hooks, the same loop guard, its own row in the transcript. A script is just a way of writing calls, not a way around them.
- Limits per execution. 30 seconds of the script's own computing time, 100 tool calls, 1,000
fetch()requests, 256 MB.
Asked for today's temperature in the 20 largest cities, Claude Haiku 5.5 answered in 13 seconds with two model requests and one execution. This is an illustration of that execution's shape, not the script itself:
const cities = [/* twenty names with coordinates */];
const readings = await Promise.all(cities.map(async (city) => {
const response = await fetch(forecastUrl(city));
return { city: city.name, temperature: (await response.json()).current.temperature };
}));
return readings.sort((a, b) => b.temperature - a.temperature);
On 2026-11-24, before a script could send requests itself, two other models took 34 and 135 seconds on the same question through page reads. The models differ and the slower run included failed requests, so the gap is not all fetch(). The 13 second run also shows the new failure mode: the model typed the list of cities from memory, using an older ranking, and never checked it. A script makes it cheap to be fast and wrong.
What the comparisons showed
We ran these on copies of one person's browser profile, on development builds, with no standard benchmark. Conditions changed between rounds, and we fixed defects as we found them, so treat the numbers as directional rather than a formal benchmark.

Figure 2. Cost of the same tasks under the old tool list and under two tools, in the two comparisons that ran side by side. Each changed the prompt, the number of declared tools and the calling method together.
The two sets: six one-sentence personal tasks on GPT 6 Luna, 13 chats per mode; and five harder multi-step tasks on Gemini 4 Neon, 10 chats per mode, scored by a blind judge who saw only what the person saw.
| Old tool list | Two tools | |
|---|---|---|
| Everyday tasks, cost | $0.160 | $0.058 |
| Everyday tasks, time | 610 s | 510 s |
| Everyday tasks, prompt tokens | 3.41M | 1.40M |
| Harder tasks, cost | $2.68 | $1.47 |
| Harder tasks, time | 633 s | 701 s |
| Harder tasks, outright failures | 4 | 0 |
Four caveats belong next to that table.
First, the comparisons are confounded. The new mode had a much shorter prompt, 2 declared tools in place of 25, and a script tool, all at once. We never ran the control that separates them. A personal chat's first request measured 17.8k tokens after our 2026-11-18 prompt change and between 6.3k and 8.6k under the new mode on 2026-11-25, and we suspect the smaller request did much of the work.
Second, scripts fail more often than direct calls. In the first comparison 8 calls failed in the new mode against 1 in the old; in the second, 8 against 0. Each was a script that threw and was corrected on the next step. Two new-mode chats in the first comparison also hit a defect that lost the person's answer and were rerun after the fix.
Third, the failure count is the judge's. Our own notes on those ten old-mode chats account for three of the four: two answers written without asking a question the task needed, and one answer that never reached the conversation.
Fourth, the time saved is mostly on the model side. We cut the time our own runtime adds to a run by 22% and total time did not fall, because the provider was slower in that round and the runs did different amounts of work.
A third comparison, four tasks in web document, spreadsheet, slide and drawing apps, is the one we learned most from. It is not in the figure because it took two attempts, and it is described under "A script hides failure" below.
Fewer tools, less instruction
The evidence behind the title is one controlled result, two uncontrolled ones that point the same way, and eight days of removals that mostly cost nothing.

Figure 3. Two cases where taking something out of the context did not hurt. Left: one built-in skill hidden, 12 runs per arm, only the skill changed. Right: 16 tools kept out of about 100, 18 tasks, one run per arm, against reference runs from earlier rounds.
A skill that cost more than it gave. Aera ships with a built-in skill of advice for editing pages in web apps. With both arms in the new mode and only that skill hidden, the runs without it got 12 of 12 files right for $2.75. The runs with it got 11 of 12 for $3.71. Every spreadsheet run we checked that had the skill loaded it and pasted a table as it advised. The paste landed in one cell, and the run then typed every cell by hand, at about twice the cost of the same task without the skill. The model followed the advice, and the advice was wrong for the case. The skill is still in the product as we write this, and fixing it is on our list.
Sixteen tools did the work of a hundred. We hid all but 16 of about 100 tools in the list and ran 18 tasks. Blind graders scored the reduced set 4.83 out of 5 for quality. The full set, graded three times, scored between 4.56 and 4.83, so the difference is inside the graders' own variation. Across the reduced sets we tried, cost fell 13% to 19%. That was one run per arm with no control beside it, so we would not publish it alone, though it lines up with everything else we saw.
A predefined tool can be worse than the code the model writes. We ran into three cases of this, and ended up removing the tool in two of them:
- The page readers. A reader tool cut a 704,000 character page at 30,000 or 100,000 characters, and the run told the person it had read every thread. Another returned text that was almost certainly a hidden dialog, as if the page showed it, and the run reported a problem the page did not have. We withdrew four reader tools from scripted runs. The agent now reads a page with its own code, and the prompt points it at
document.body.innerText, which leaves hidden text out. We have not yet confirmed that on the current default model. - The click-and-type tool. With it hidden, the agent filled a spreadsheet by typing whole rows in one keyboard call, in about half the time and cost. A document task gained nothing from hiding it, so the tool stays.
- The lookalike. A tool named
browser.fetchran a request through the page in a tab. One model called it 20 times in one run and 24 in the next, and every call failed because of the page its tab was on. Our reading is that it looked like the standard function and was used as one. We replaced it with the realfetch()and removed the lookalike, so a run sees one way to send a request.
Describe good work, not procedure. Our early prompt for the new mode still carried lines such as "work in steps you can check". Models followed them literally, sending a plan message and keeping a task list for a one-minute question. We replaced them with a description of what a good engineer does: get the task done in as few round trips as the work allows, run independent work at the same time, work from the data at its source. On the weather question the cheaper model went from 59 seconds to 34 and from $0.0080 to $0.0033. The stronger model got slower and more expensive on the same change, with failed requests in both of its runs. That was only one run per model, so take it lightly.
Models treat text in their context as a rule and a declared tool as the intended path. Both were written for models that needed step-by-step guidance; newer models just get boxed in by them.
Design tools to be written, not chosen
When a model picks a tool from a list, the description carries most of the weight. When it writes a call in code, the name, arguments, and return value matter much more, and several of our tools were awkward in ways that had not shown up before.
Our first tool list gave only a name and a sentence. Over three days of real use, about 190 of 3,227 script calls failed, and about 80 of those failures were arguments the model had guessed. Rather than telling the model to search first, we put a compact argument line beside every tool in the list (which nearly tripled the list's size) and made every refusal carry the tool's full signature. In the next live run 3 of 30 scripts were retries, against 5 of 22 before, though that is only one run on each side.
Small verbs also matter. Moving a plan forward used to mean passing the whole list back, and two live runs wrote a plan once and left it at 0 of 9 and 0 of 7 steps for five minutes. We added plan.next(), which takes no arguments and reads naturally on one line of a script. A later run used it without being told. Plans still move in jumps, so this one is only partly solved.
Language conventions caught us too. Our wait tool took seconds, while JavaScript thinks in milliseconds. Two runs passed a millisecond-sized number and slept for the five-minute cap while their chats looked frozen. The tool takes milliseconds now. Similarly, when a tool has no declared return type, search_tools now says so and tells the model to log one result before relying on its fields.
Finally, we wanted the agent to acknowledge a message before starting long work, and prompt guidance for this was unreliable in our tests. Putting two optional fields on execute itself, tell and react, sent before the code runs, worked much better: the model fills a field on a call it is already writing, with no extra round trip. We have not measured this cleanly, and one of our early tests of the prompt version was later found to have run in the wrong mode.
A script hides failure unless the runtime reports it
This is the part we would most like other teams to read before they ship.
A script can catch an error and carry on. One run sent a message to nine recipients with each send wrapped in a try and catch, then stopped on a later call. The result named only the last error. The run told the person that six replies were pending, from recipients that had refused the message.
The web app comparison is the other case. On its first attempt, screenshots returned by a script never reached the model. They were buried in the result as text and cut off. The model worked blind and reported a table and a chart that did not exist. Two of four files were wrong and all four were reported done, for $1.07 and 789 seconds. The old mode, which could see, got all four right for $2.78 and 1,133 seconds. After we fixed the delivery of images, a second attempt in the new mode got all four right for $0.83 and 621 seconds. The old mode was not run again, so we do not count that as a comparison.
What we changed, all of it in the runtime:
- The result of every execution lists each call that failed inside it, whether or not the script caught it.
- The result reports arguments a tool does not declare. The runtime had dropped them silently on 179 of 2,743 calls.
- The runtime refuses a send with no text. It had been answering
success: true. - The next request carries the screenshots a script took, whether or not the script returned them.
- What the person answers to a question asked inside a script is always in the result, even when the script returns nothing.
In the end, we still had to check the output files directly rather than trusting what the run reported.
The person disappears first

Figure 4. One execution can hold a hundred calls, and none of them reached the display. The call counts on the left are from one real request. The strings on the right are the product's own wording with example names and values.
One personal request made over a hundred tool calls in three and a half minutes. It fetched thirty pages, saved a spreadsheet, changed two schedules and wrote to three other agents. The conversation showed "Working on it" and three site icons. A workspace run later worked for 21 minutes through 42 scripts and 395 page fetches, and the person could see five rows naming its helpers.
The cause is structural. Our progress display took its words from the plan's current step, a reasoning heading, or the tool the model was calling. A scripted run calls one tool, and the hundred calls inside it reached none of those. What saved the model round trips left the person with nothing to look at, and no prompt change fixes that.
What we built:
- The step, in the agent's words. The first field of
executeis a description of the activity, declared first so that it arrives while the code is still streaming. The conversation shows it as the step under way. - A trail built from results. What the run has done is read off what its tools returned: pages read, files saved, schedules changed, who was asked and who has answered. It is never the model's own account. An early run had described a script as reading a page when it had read the person's new tab.
- Speech from inside a script.
tools.person.tell()reaches the person while work continues.tools.person.ask()waits inside the execution for the answer, so a question no longer ends the turn. - A place for work nobody asked for in the chat. A workspace run that no chat message started, such as a scheduled responsibility or an assignment, has no conversation to speak into. Its words, plan and trail are saved as a turn in a thread the person can open later. Before that, the words of such runs were refused by the conversation and reached nobody.
We found little of this in published work on code mode. The closest is the documentation for Claude Code's experimental code mode, which describes what the person sees and approves. All of it was required before the mode was usable by someone who was not reading the transcript.
The harness was leaning on the tool list
Moving the tools broke things that never mentioned tools.
Our loop decided whether a turn was the workspace Manager's conversation with the person by looking at which tools were declared. With two declared, those runs silently lost their conversation guidance and their acknowledgement check. Nothing threw.
The short prompt we wrote for the new mode replaced the whole prompt stack, by design, from the first build. For the length of the trial phase no scripted run read our rules on prompt injection and consent, the agent's character, or its memory guidance. We restored the full stack, rewritten smaller, within about an hour of making the mode the default and before any release carried it. The cost comparisons above were therefore run without those rules, which flatters them.
About 900 places in prompts, skills, tool descriptions and error messages named tools by names a scripted run no longer called them by. Saved site skills, written by the agent for its old tool list, told it to use tools it no longer had; on our own profile we deleted 45 of 81 and rewrote or merged 26. The release's proof that the packaged build works never loaded the script engine.
None of these were hard to fix once we saw them, but they were easy to miss because a harness encodes assumptions about its tools in a lot of places outside the tool list.
What code mode did not fix
Code mode did not fix tasks where the underlying workflow was the problem. On long workspace runs with an early script tool added, readers who were not told the setting found no more meaningful output. The wasted steps there were re-recording the same numbers, review loops and failed writes, and no tool setting touches those.
Scripts also do not make a model smarter about getting stuck. In one scheduled task from those rounds, 81 of the 143 calls its scripts made re-read the same 90 KB file, because the read returned a capped result. A script will happily repeat a read that disappointed it instead of changing approach.
Model differences stayed wide. On three tasks that a script makes simple, every one of four models did the work in code. The cheapest model cost $0.023 for the three and the most expensive $0.707. Two of the four each got one task wrong, and at least one of those errors is the kind a reader would not catch.
What another team could take from this
- Freeze the tools array first. If your harness loads tools mid-conversation, the cache cost is real and the fix is independent of everything else here.
- Run a removal test. Hide a tool or a block of instruction and run your tasks. We expected to pay for each removal and mostly did not.
- Review each tool as a function signature. Name, arguments, units, return type, error text. Ask how it reads on one line of code.
- Report failures from the runtime. Do not rely on the script to surface them or on the model to notice.
- Build the person's view from tool results. Decide what the person sees while a script runs before you ship, and do not use the model's narration as the record.
- Search your harness for everything keyed on the tools array. Routing, guidance, checks, tests, saved skills.
- Keep checking the actual outputs. Running code makes tasks cheaper, not automatically more accurate.

