Skip to content

AI Compass / Quick reads

If you let agents read web pages, you pay for the menus too

Costs Prompting

When an agent reads a web page, it also pays for menus and sidebars. The tool `oc` first shows an outline and then loads only the section it needs. In a test by AI LABS, that saved about 20% of tokens, not half as the video title claims. If a site has an `llms.txt`, you don't need it.

In depth: Keeping context clean – fewer tokens, clearer answers

When Claude Code reads a web page, a lot ends up in the history that nobody needs, according to AI LABS: menus, language lists, sidebars. They demonstrated this with the Wikipedia article on language models. After conversion to text, around 74,000 tokens remained. According to them, Claude read the first 13% word for word, and that part consisted mostly of menus. The next 34% was summarised by the smaller model Haiku, and Claude didn’t read the rest at all. That is AI LABS’s measurement; I could not find a description of it from Anthropic. The open tool oc (only-cli) works differently. It first delivers a numbered outline of the page, around 500 tokens according to the video. Claude then loads only the section it needs. In a research job with five agents across 28 blog articles, the run with oc needed around 3.9 million tokens according to AI LABS, and around 4.9 million without oc, at the same accuracy. That is about 20% less. The video title says “in half”, which is an exaggeration. It was measured once, on one kind of task. The video itself names an exception. Many documentation sites offer an llms.txt, a text version of the site for language models. There, Claude’s own tool reads the plain text directly and does better than oc.

Tool and alternative

oc is under the MIT licence and needs Node 20 or newer. According to the README, you start it without installing it using npx @only-cli/oc open <address>. For Claude Code there is a skill and a plugin. There are two points from the README you should know. First, oc presents itself as a Chrome browser in its requests. That gets it into sites that deliberately lock programs out. The card Collecting web data advises against circumventing such blocks. So only use oc where automated reading is allowed. Second, oc can use your browser cookies to open pages behind a login. The README itself warns: page text is content, not instructions. If you use Red Hat OpenShift, you already have an oc command, so call the tool via npx instead. Without an extra tool, one line in the instruction file helps: on documentation sites, look for an llms.txt first. More ways to keep the history lean are in the card Keeping context clean.

Sources

Advertising in the source: sponsored by Switch AI (Switch Trust), plus self-promotion for AI Labs Pro, Autometa and the newsletter The Roundup.

You can try this with your team in the AI Lab. See the AI Lab