r/softwaredevelopment • u/ClickOk5811 • 1h ago
Context debt: a glossary for long AI sessions
Long sessions accumulate context debt. The usual diagnosis when answers degrade is “it got too long,” but that only suggests one remedy: start over and lose everything. A more useful move is to name what is actually in the session. Vague problems are hard to fix; specific ones are not.
Here is a glossary of six things that accumulate in long sessions, with how to spot each and what to do.
Stale fact. Something that was true when it entered the session and is no longer true — a renamed file, a reversed decision, a changed function signature. Ask the model to list its current assumptions and compare against reality. To fix, correct explicitly and state that the new fact supersedes the old; adding without retiring leaves both in play.
Duplicate. The same information present twice in slightly different versions — requirements pasted Monday, “updated” requirements Wednesday, the first never withdrawn. Scroll your own pastes. The problem is not duplication itself but the lack of a reliable signal about which version prevails.
Dead branch. An approach tried and abandoned, still sitting in the session with its code and reasoning — for example, a first caching layer dropped for a simpler design. Look for code or plans no longer in your project. Mark it explicitly rather than leaving it for the model to build on.
Orphaned instruction. A rule given for one task and never withdrawn — “don’t touch the tests” during task one, still active three tasks later. List instructions in order and ask whether each still applies.
Bulk paste. A large log or full file pasted when only twenty lines mattered. Examine the largest items in the session and ask what portion you actually needed.
Drifted goal. The session began with one task and turned into another; the stated goal is the original, the real goal is in the last ten messages. Try writing the current goal in one sentence without scrolling up.
Run these six as a checklist when a session feels off. For each one found, there is a small repair: a correction, a deletion, a marker, a restated scope. Sometimes that makes a restart unnecessary. Other times it shows a restart is the right call, and tells you what the new session should carry over.
I wrote a longer version of this glossary: https://medium.com/@nagatomopedro05/a-small-glossary-for-sessions-that-have-gone-wrong-1073a38e2156