Notes on working with AI
Don't make Claude read every row
One job took 150,000 tokens, then about 2,000 once the agent wrote code instead of reading everything. Why that works, and a version you can use today.
From 150,000 tokens to 2,000
Anthropic's engineering team described a plain office job: take a two-hour meeting transcript from Google Drive and attach it to a Salesforce record. Done the usual way, it used about 150,000 tokens. Done differently, about 2,000. Anthropic puts the drop at 98.7%, for the same job and the same result.
Tokens are the pieces of text a model reads, and also what you pay for and what fills its working memory. So what changed is how much the model was made to carry.
Why the usual way is wasteful
Most agent setups load the description of every available tool into the model's context before it does anything. Then every intermediate result passes through the model too. In the transcript job, the model asks Drive for the document, the whole transcript comes back into its context, and then the model has to write that same transcript out again to the Salesforce record. The text crosses the model twice, which Anthropic estimates at about 50,000 extra tokens. The model never needed to read the transcript to move it.
It is like phoning your spouse from the supermarket for every item on the shelf, instead of sending one list and letting them shop.
What changes: tools become code
In the approach Anthropic describes, the tools are presented to the agent as code it can call. So the agent writes a short script: fetch this document, write it to that record. The script runs outside the conversation, and only what the script prints comes back to the model. If the agent chooses to print two lines ("done, transcript attached"), those two lines are all it ever sees.
Three more benefits follow from the same move. A 10,000-row sheet can be filtered in code, so the model sees five rows rather than ten thousand. Loops and error handling live in the script instead of costing a model turn each. And sensitive fields can travel between two systems without ever entering the model.
The caveat is real. Running code that an agent wrote needs a sandbox, limits and monitoring. This is an engineering decision for whoever builds your agent, not a switch you flip.
The same principle, in the Claude app today
You don't need to build anything to use the idea. In Claude, this setting lets it process a big file with code instead of reading every row into the conversation:
Settings > Capabilities > Code execution and file creation
It is available on all plans, including Free, on web, desktop and mobile.
Three jobs where it earns its place:
Finance. Upload a year of transactions as a CSV and write: "Use code to process this file. Show me only a table of totals by month and the 10 largest customers. Don't print the rows." Back come two small tables you can check against your ledger.
HR. Export the employee list from your HR system and ask for duplicate records by ID number or name. You get the short list of duplicates, not a tour of every row.
Marketing. A campaign export with thousands of lines goes in, and you ask for the five cheapest and five most expensive leads with their sources. The analysis is done by code that you can ask Claude to show you.
What to do this week
Turn the setting on, take the biggest spreadsheet you have been dreading, and ask Claude to process it with code and show you only the summary. Then ask it to show the code, to see what it actually did.