A new session shouldn't have to rediscover the project

A new coding-agent session often starts by walking the repository again: architecture, layout, conventions, and commands. Public issues show two weak fixes: stuffing that map into the always-loaded brief, or copying it into skills that then go stale.

·5 min read

You open a new session with a coding agent, and it starts walking the repository again. How the architecture is split. Where the directories live. What the conventions are. Which commands people actually run. The map was clear in the last session. This one has to find it all over again.

Every new session walks the tree again

In a public issue on MazeGen, Sergey-Lomov describes exactly that cost. Every new agent session spends time and tokens re-exploring the repository to rediscover architecture, directory layout, conventions, and typical commands. The issue is still open. It is a proposal, not a completed experiment, and it does not measure how many tokens that walk actually burns. The pain is still specific.

The idea under evaluation is to package that knowledge into dedicated skills, one per area of the project, that an agent can load on demand instead of exploring from scratch. Each skill might cover the architecture of its area, relevant directories and key modules, coding and testing conventions, related crates such as maze-core or maze-web, and typical commands. The issue already flags the hard part: keep those skills in sync with the code and with Specs/, so they do not go stale or duplicate AGENTS.md.

That last sentence is the real fork. Skills can stop a fresh session from repeating the same search. They can also become a second, quieter copy of the project map.

Skills are for procedures. They are not a second project map.

Claude Code's skills documentation draws a useful line. Create a skill when you keep pasting the same instructions, checklist, or multi-step procedure into chat, or when a section of CLAUDE.md has grown into a procedure rather than a fact. Unlike the always-loaded brief, a skill's body loads only when it is used, so long reference material costs almost nothing until you need it.

Anthropic's engineering post on Agent Skills calls this progressive disclosure. At startup the agent loads only the name and description of each skill. The body of SKILL.md is read when the task actually matches. Extra files in the skill folder are loaded only if they are needed. That design is for workflows and expertise you want on demand. It is not a reason to copy current project facts into a second home.

The same Claude Code page is already watching for rot. /doctor prompt-audit checks your instruction files, skills, and other configuration for outdated or conflicting instructions. That check needs Claude Code v2.1.283 or later. It is a product command, not a study of how often skills go stale. The fact that the command exists is still a signal: skills can drift, and they can disagree with the brief.

A bundled flow makes the same point in another way. /run-skill-generator records how to build and launch the app, and commits it as a per-project skill, so later runs follow the recorded recipe instead of rediscovering it. The docs say to run it once per project, and again if the build or launch process changes. A recorded recipe that nobody updates is just another stale map.

The always-loaded brief cannot hold the whole map either

The other common fix is to keep stuffing more of the project into the file every session already loads.

In a public pull request on SchoolPilot, bzinkan cut CLAUDE.md from 1,604 lines to 128, with a 200-line limit checked in the scan. Deployment procedures moved into docs/PRODUCTION_DEPLOYMENT.md. Dated notes and superseded rollout decisions were kept with their original releases, not in the always-loaded guide. A fresh Codex agent followed the startup path and found the expected answers for missing targets, new tenant tables, and frontend release and recovery. The Claude Code check stopped at an expired OAuth session, so that path was not fully verified.

A different failure showed up in public on X. NEBHRON built a tool to sync memory across coding agents. The tool ingested its own output until AGENTS.md hit 1.1 MB, and every agent loaded an 805 KB file on every prompt. The conclusion in that post is direct: push-sync copies knowledge, and every copy goes stale. Pull wins. One home per fact.

This is one post, not a benchmark. The numbers are what the author reported. They still show what happens when a growing memory is pushed into the file that loads on every prompt. The next session does not get a clearer map. It gets a larger tax.

Give the next session a current map, not another search through the tree

A practical split looks like this.

  • Project background, decisions, and constraints need one current home the next session can read before it starts work. Do not leave the next agent to reconstruct that map from the tree, every time.
  • Skills are a good place for procedures. How you deploy, how you launch, how you run a checklist: load those on demand. Point at the current home. Do not restate the architecture in the skill.
  • Keep the always-loaded brief short. It can point at the map. It should not be the archive, the runbook, and the decision log at once.
  • When the truth changes, update the one home. If a skill records a procedure, update that skill too, or generate it again. A skill that still describes last month's launch path is itself a stale current-state line, and it will send the next session the wrong way.
  • Do not push a growing memory into every prompt. If a sync tool is copying the same facts into the always-loaded file, the copies will go stale, and the file will only get heavier.

MindMux itself makes a product in this space.

MindMux captures background, decisions, and constraints from the conversations you already have with agents, and writes them into a Markdown project brain. Agents read that brain over MCP before they start a task. To connect Claude Code or Codex, install @mindmux/cli and run mmx setup in the project. mmx setup --local gives a local Brain without Cloud login. The open, local counterpart, brain.md, is a brain/ folder in your repo plus a small CLI (@mindmux/brain-md). Every page keeps a compiled_truth, the current answer, and an append-only timeline of how you got there. It is git-native and agent-agnostic: Claude Code, Codex, Cursor, and anything else that can read a file.

This is cross-session, cross-tool decision memory. If the next session already has the current map, it can start the work, instead of walking the tree again.

Share to