DEV Community

Cover image for Your Agent Never Clicks Those Links. Stop Paying for Them
AheadKit
AheadKit

Posted on

Your Agent Never Clicks Those Links. Stop Paying for Them

Open Wikipedia's list of programming languages and read it the way an agent does. There are 1,051 lines of visible text on the page. 862 of them are a single link and nothing else. A name, an underline, a destination. The page is a phone book with a few paragraphs of introduction stapled on top.

I counted what those destinations cost. The words on the page come to 9,709 tokens. The addresses behind the links come to 10,147. The addresses cost more than the page itself. A markdown copy that kept both would run 19,856 tokens. Strip the addresses out, keep the names, and it is 9,709. Half the price, same reading.

That was the extreme end of a test agentsearchhq suggested in the comments on yesterday's piece. Take the markdown twin of a docs page, the cheap .md copy that docs sites now serve next to the HTML, and strip the hrefs out of it. The idea sounds like free money. A twin already costs about a fifth of reading the live page, and the URLs inside it are dead weight if nobody clicks them. So how much of the twin is addresses?

On ordinary docs pages, less than you would hope. I reran the same seven pages from yesterday, the Aptos AI hub and six Gradle chapters, fresh copies, same tokenizer, then stripped every href and counted what was left. Here is the table.

Page .md tokens Hrefs Href share Stripped Main text Stripped vs main
Aptos AI hub 2,675 300 11.2% 2,375 1,838 1.29x
Gradle getting started 2,165 1,226 56.6% 939 2,382 0.39x
Gradle installation 3,402 493 14.5% 2,909 4,174 0.70x
Gradle troubleshooting 4,520 1,013 22.4% 3,507 4,826 0.73x
Gradle compatibility 2,414 135 5.6% 2,279 3,341 0.68x
Gradle declaring dependencies 2,011 295 14.7% 1,716 3,205 0.54x
Gradle build lifecycle 6,648 1,516 22.8% 5,132 7,554 0.68x

On a normal prose page the links are 6 to 23 percent of the twin. Stripping them saves a little, not a lot. The one exception is the getting started page at 56.6 percent, and it is an exception that explains itself. That page is a table of contents. Most of what it contains IS links to other chapters, 46 of them, some with addresses over a hundred characters long carrying anchor slugs like developing_binary_plugin_advanced. Its stripped twin is 939 tokens against 2,382 of main text, because the twin is a summary of the page, not a copy of it.

Then there is the Aptos page, which points the other way. Strip every href and the twin still costs more than the page's main text, 2,375 tokens against 1,838. On that page the twin's cost is not the URLs. It is everything else the markdown carries that plain text drops: the heading markers, the code fences, the table pipes, the tab labels for all four MCP clients, Claude Code and Cursor and Codex each named in full. The addresses were 11 percent. The other 89 percent is structure and words, and no strip command touches those.

So the strip is a scalpel, not a diet. It barely moves a prose page. It doubles the saving on a link page. I checked two more pages that sit between the two ends. Gradle's own user manual index carries a 27.7 percent href share, and the Anthropic docs welcome page 20.1 percent. Both are landing pages with link lists mixed into prose, and both land well short of the Wikipedia extreme, where 82 percent of the lines are a bare link and the addresses outweigh the words.

That split is what decides whether the strip is worth doing, and the deciding fact is not on the page. It is in how the page gets used. An agent that opens a docs page once, reads it, and moves on will never click a single link in it. Every address in that read is money spent on a destination nobody visits. An agent that opens a page to move through it, following links to the next chapter or checking the source of a claim, needs those addresses intact, because the anchor text alone does not say where a link goes. Same file, same strip, opposite answers, and the difference is the job, not the page.

My rule from here on is simple. If the twin is a single read, strip the hrefs before it goes into context. It costs nothing to do, it saves 6 to 23 percent on prose pages, and it halves the bill on the link-heavy ones. If the agent is going to navigate, keep them. The version numbers and anchor slugs inside long Gradle URLs are the one quiet exception, a slug like gradle_basics does carry meaning, but it is not worth 1,226 tokens on a contents page to keep it.

Yesterday's correction still stands. The twin is about five or six times cheaper than reading the live page, not twenty-six. Stripping the links shaves a little more off that, and on the pages where the twin is fattest, it is worth more than the twin itself. The expensive part of a page was never the words. On the worst pages it is the addresses, and your agent was never going to click them anyway.

What does your agent actually do with the links in a page it opens? Does it follow them, or does it read once and move on? I keep assuming the second, and I would like to be wrong about it.


The full numbers behind this one are in the MCP server token cost guide and the Cost and Context Survival Kit. Everything I write here stays free, that part doesn't change. — Salam

More from AheadKit: programming books, packs and AI tools. Each page lists exactly what's inside before you pay.

Top comments (0)