Stop guessing what your agent is doing

2026-11-22 · notes from building LaneConductor

This post is about coding with a coding agent (in my case Claude Code, which reads your repository, edits files and runs commands), our responsibilities as engineers, and how we can save time, tokens, energy and money by optimizing the work our agents do. In my own sessions, handing work to sub-agents in specific scenarios could potentially save an estimated 2 billion tokens, which translates into roughly $200 over 11 weeks of my coding. The question is which scenarios, and how to discover them. (The $200 is a rough estimate using Anthropic's API prices and the model I am using.) That is one developer. If each of 100 developers worked like me, it could be about $90,000 a year (a multiplication, not a forecast). Most of the time, an agent does its work and you find out what it did at the end. Sometimes you can't even do a post-mortem, because nothing recorded where the effort went. I wanted to stop guessing, so I made the work visible at three moments, using a framework designed to externalize the agent's planning, implementation and quality gate process, which in turn allows optimization at every step.

Before: the plan says what it will do. In LaneConductor a piece of work (a track) is a folder of plain files, inspired by the layout of Google's Conductor for Gemini CLI, with lanes added, and plan.md is a list of phases with checkboxes. Before any code is written you can read what the agent is about to do, change it, and see which steps are marked as waiting for a person. That is the engineer's part of the job: more than reviewing what the agent produced, it is seeing how the agent works and optimizing it (more on that role in The AI engineer, the software developer role and the Jevons paradox).

During: the boxes show what it is doing now. The agent ticks a box when a task is done and its check passed. Because the plan lives in git and a board reads it, you can see which phase is running, what is done, what failed its test, and what is parked waiting for you. You don't need to scroll a chat to know where it is.

The LaneConductor board open on a track that is running: the plan with its phases and tasks, some ticked and others still open, including one waiting for the owner.
One track on the board: the plan with its phases and tasks (before), and the running badge with ticked and open boxes, including what waits for a person (during). A track from my own app, Otralingo.

After: the numbers show how it went. A SQL database has EXPLAIN, which shows where a query spends its time and how it was executed. Agent work had the same blind spot, so I added the equivalent. Every Claude Code session already keeps a record of token counts and timestamps, and every track keeps ticks and dated lines in git. The board add-on of LaneConductor (a set of Claude Code plugins whose source is public on GitHub) has a measuring command for it, /laneconductor:explain. It joins them and gives the plan with costs, per lane and per phase: time spent working versus waiting for a person, tokens (output, fresh input, cache), tool calls and how much a sub-agent did. The agent doesn't write these numbers, because it can't read a clock or its own meter. They are measured from outside, and only counts, times and tool names are read, never what was said.

What it showed on one small track (a skill pack: plan, implement, review, 20 minutes, 3 of them waiting on me): the agent wrote about 43,600 tokens and read 15.8 million from cache, about 360 times as much. On a bigger track it was 540 times. Every reply re-reads the whole conversation so far, and the work ran inside one long session. So the cost was not what the agent wrote. It was how much it carried along. On the same small track the planning step began with 958,019 tokens of history, and the tool said so in one line: run this in a sub-agent or a fresh session.

I also instruct the analysis to find the root cause and suggest a solution. It checked the instruction text each lane carries (about 27 KB) and showed that it was about 3 percent of one reply's context. The real cost is the length of the session doing the work. A sub-agent in its own worktree starts at roughly 13,000 to 16,000 tokens in the table further down, a small fraction of what the long session re-reads on every reply. So I changed the default: lane work goes to a sub-agent unless you say otherwise.

Did it change the next runs? The project summary answers that without reading any single run. Across the explained tracks (as of 25 November), 10 of 22 lane runs ran in a sub-agent. The 12 that stayed in the main session started with a median of 649,159 tokens of history, and 9 of those 12 began at 400,000 or more. That last number is the one to watch: if the new default works, it goes down with each track, and the Low recommendation on the board goes away.

It happens to the agent that builds this, too. I ran the same count over the record of the one Claude Code conversation that did most of the work, across 26 days of work spread over 11 weeks (as of 24 November): 7,513 replies wrote about 5.4 million tokens and read about 3.9 billion from cache, around 518,000 per reply, with a peak of 967,000, and it was compacted into a summary 16 times. The 117 sub-agents it started began at a median of 55,000 tokens and averaged 154,000 per reply over their whole run. So the long conversation that coordinates everything is the expensive part of the setup, and the work handed to short sub-agents is the cheaper part. As a rough estimate, if that sub-agent work had run in the main conversation instead, it would have re-read about 2 billion more cached tokens: roughly $200 at Anthropic's API price for cached reads ($0.10 per million tokens on Sonnet 5.5), about a fifth of what the whole session would cost at API prices. That is an API-price equivalent, not a bill (on a subscription you do not pay per token), and it assumes the same replies at the main conversation's average size. This is counts only, read from the session records, and the same limits apply.

The report opens the way EXPLAIN does: the steps in a table, and where the cost sits. Everything else is folded under Details. Below the table it marks the most expensive step and adds up to three lines on what to change; the screenshot shows the table and the first two lines. Here it is for the track that built the feature: one row per lane run, where it ran, how long it took, how many tokens it wrote, and how much context it started with. The time in brackets is waiting for a person.

The Agent run tab of a track on the board: a short plan table with one row per lane run, showing where it ran (main session or sub-agent), the time with the human wait in brackets, the tokens written and the context at the start, and the first suggestion lines below the table.
The short plan and the first lines under it, for the track that built it. The first implement run shows 13 hours 15 minutes with 12 hours 50 minutes of it waiting for a person, which is why the human time is split out.

One track is a story; several tracks are a pattern. A button on the board reads the last ten tracks that have these numbers and ranks the actions High, Medium or Low by how many of those tracks they fired on (at most five), each with one number and a button that copies a plain sentence to hand to the agent. On this repository, today, it says three things. High: set the lane to running when you start it, because in all ten tracks some lane runs were never claimed, so their time is inferred. High: use a lower effort for mechanical work, which applied to six of the ten. Low: run long lane work in a sub-agent or a fresh session, which applied to two of the ten.

The Agent recommendations drawer on the board: three actions with a High, High and Low badge, each with a count of the tracks it fired on and a Copy button, and the list of the ten tracks it looked at.
The recommendations across the last ten tracks: three actions ranked High, High and Low, worked out by rules from token counts, not by a model.

How to use it. It all runs on the developer's machine, inside Claude: LaneConductor is a Claude plugin, its commands are skills, and the board, with every tab and drawer you see in the screenshots, is a Claude artifact built from the track files. The analysis itself reads the session records Claude Code already keeps on your machine and makes no network request. In Claude Code, /laneconductor:explain 10154 explains one track, here track 10154, and writes its explain.md, which the board shows as the "Agent run" tab of a track that is not done; every explain also updates the project summary, conductor/statistics.md. /laneconductor:explain statistics rebuilds that summary from the tracks you have already explained and shows it in the chat; the board shows it as the Statistics tab with the recommendations across them, including for finished tracks. It analyses no new track, so a track that is missing from the summary needs its own explain first. There is no explain-everything step on purpose: reading the session records of every track can be heavy, so explain the tracks you care about, then run the summary. /laneconductor:board refresh puts both on the board.

The first time I ran it across tracks the totals were wrong. Six tracks had sat in the same lane for four days while one session worked on all of them, and every one of them was credited with all of the replies in that window, so the same replies were counted six times. Now a lane window shared like that keeps its time but shows its tokens as not measured, instead of crediting each track. A number like that is only as good as the rule that attributes it, which is the reason each figure above carries a note that it is approximate.

I would not have found this without the three views. The plan told me what was supposed to happen, the ticks told me it did, and only the numbers told me what it cost.

Limits: this is one repository and a few tracks. It counts tokens; the one money figure above is an estimate at API prices, not a bill. Attributing messages to a track is by time window, so overlapping work can share numbers, and about half of the lane runs I looked at (24 of 47) never recorded when the lane started, so their times are only inferred. Read these as relative numbers.

A question for you. The scenarios I look at are lane runs that start inside a long session, over 400,000 tokens of context, and the explain command finds them: it works on token optimization, and it shows where to optimize. It does not say what it costs to hand work to a sub-agent, so I cannot yet say where moving work pays off. Which scenarios are relevant in your work, and how would you find them? If you have measured this, I would like to hear what you found.

LaneConductor is a personal project and a pattern being explored. Plans, tracks and the board are plain files in git, and the plugin's source is public on GitHub, free to use and modify. Read how it works or see the docs. Questions or experience to share? Ask in GitHub Discussions or find me on LinkedIn.