Lost Context

ErrorIntermediateSeverity: MediumAgent behaviour

The agent repeats mistakes you corrected earlier or breaks rules you both agreed on.

Symptoms

  • The agent repeats mistakes you corrected earlier or breaks rules you both agreed on.
  • It ignores parts of the project.

Cause

The context window is limited; in long sessions old messages are summarised or dropped, and important details get lost.

Fix

  • Put permanent rules in a context file (AGENTS.md or CLAUDE.md).
  • Start a new session with a summary of the previous one.
  • Name the relevant files explicitly in the request.

Prevention

  • One session per task.
  • An up-to-date context file.

Sources

  1. Claude Code: memory management and the CLAUDE.md file
  2. AGENTS.md: an open format for coding-agent instructions