# Why coding agents forget, and what to do about it

Canonical: [Why coding agents forget, and what to do about it](https://contextingo.com/blog/why-ai-coding-agents-forget)

Locale: en

Purpose: A coding agent starts every session with an empty context. Why that happens, what CLAUDE.md and AGENTS.md can and cannot carry, and what teams do instead.

Content updated: 2026-09-02

Source revision: content.ts 2026-09-02

Maintenance owner: the Contextingo site owner

[Topic map](https://contextingo.com/llm/topics/blog.md) · [Complete scoped map](https://contextingo.com/sitemap.md)

You spent an hour with Claude Code or Codex finding out why a migration fails. The next morning you open a new session and it proposes the fix you already ruled out. Nothing is broken. That is how the tools work.

## What a session is

A session is a conversation plus the files the agent read. Its context is the text it has in front of it right now. When the session ends, that context ends. Claude Code keeps sessions on the computer they ran on; they are not a shared record of the project.

## What the instruction files do

Files such as `CLAUDE.md` and `AGENTS.md` are read at the start of a session, so they carry rules that stay true: how to run the tests, what the folder layout is, which style to follow. They are good at that. They are a poor fit for things that change daily: what was found today, which approach failed, who is working on what.

## What gets lost

- **Findings.** “The timeout comes from the proxy, not the database.”
- **Failed attempts.** What was tried, and why it did not work.
- **Decisions and their reasons.** Why we chose queue A over queue B.
- **Where the work stands.** What is done, what is next, what is blocked.

## What helps

Write these down as they happen, in a form the next session can read: one record per finding, decision or failed attempt, each with a source. Then tell the agent to read them at the start. You can do this by hand in a file, and it works for one person. Once a team is involved, a file in the repository becomes a merge conflict and goes stale.

That is the gap Contextingo fills: the agent saves records while it works through MCP, and the next session, yours or a teammate’s, starts by reading them. See [how it compares to CLAUDE.md and AGENTS.md](/compare/claude-md-agents-md).

## Questions

### Can I just make CLAUDE.md longer?

For stable rules, yes. For daily findings and failed attempts it turns into a log nobody curates, and the agent reads all of it every session, relevant or not.

### Does a bigger context window fix this?

A bigger window holds more of one session. It does not carry anything into the next session or to a teammate.
