AI Coding Weekly

Pocock's prompt reads your last 10 agent sessions

The session history you usually delete becomes the input for a repo navigability pass.

Matt Pocock posted a prompt of the day that points a coding agent at its own history. The instruction is `/retro read my last 10 coding agent sessions and find ways to make my repo easier to navigate`, with a specific brief to find where agents take too long to find relevant information, or rely on out-of-date docs.

Matt Pocock
@mattpocockuk
X
Improving navigability is such an underrated way to save tokens.
Oct 2, 2026 · View on X

The framing is cost, not tidiness. Pocock calls improving navigability an underrated way to save tokens, which is the argument that every minute an agent spends grepping around for the right file is paid for twice, once in latency and once on the bill.

Your transcripts are the eval set

The interesting move is where the evidence comes from. Most prompts about repo structure ask a model to reason about the repo in the abstract, which gets you whatever the model thinks a well organised codebase looks like. This one asks it to read the transcripts of ten real sessions and report where things actually went wrong. Stale docs show up because an agent believed them. Bad layout shows up because an agent went looking in the wrong place. That is observed failure rather than opinion, and session logs are the artifact most people never look at again.

The output Pocock describes is a list of changes to make the repo easier to navigate, so the loop ends in edits to the codebase rather than edits to a rules file. Worth saying plainly that this is one prompt from one engineer, not a measured result. Nobody has published numbers on how much a navigability pass saves.

It follows the same pattern as the rest of Pocock's prompt of the day series, including an earlier one, and a previous entry that runs `/codebase-design` over the repo looking for shallow modules and candidates for deletion, applying the deletion test. Both are short, both ask the agent to go find evidence before proposing structural change, and both aim at the same target, which is a codebase an agent can get around in without burning context.

If you want to try it, the only setup required is that your agent can read its own prior sessions. Everything else is one line.

Get the next one by email

Coding with AI, read daily so you do not have to. The experiments, the receipts and the arguments from engineers shipping real software. Not a changelog.