## Sources

1. [Your AI Agent Already Forgot Half of What You Told It](https://www.oreilly.com/radar/your-ai-agent-already-forgot-half-of-what-you-told-it/)

---

### **Your AI Agent Already Forgot Half of What You Told It** by Andrew Stellman

**Main Arguments**

*   **AI context loss is a significant, often invisible, hurdle** in both development and general AI usage [1, 2]. When an AI’s **context window**—its fixed-size "short-term memory"—reaches capacity, the system must perform **context compaction** [1, 3].
*   Context compaction involves truncating older messages or compressing the conversation into summaries, which leads to the **loss of specific details, decisions, and observations** made earlier in a session [1].
*   The AI will not alert the user when it has forgotten information; instead, it continues to generate **confident-sounding but incomplete or inconsistent output** based on its remaining memory [1].
*   Traditional project management principles for human teams—such as the necessity of **writing down discovered information** to avoid repeating discussions—are now directly applicable to managing AI sessions [1, 4].
*   Effective **context management** is an essential development skill that requires moving critical information from the AI's volatile memory into external files where it can be verified and preserved [5].

**Key Takeaways**

*   **Context loss is most likely to occur at the most inconvenient times**, specifically when the conversation has become complex and contains the most valuable information [3].
*   AIs struggle with **step-by-step procedures and counting** (like "for" loops) during compaction because they lose track of the current state or iterator [6, 7].
*   **Externalized files serve as "external memory"** for the AI, making its "forgetting" visible and allowing for systematic auditing of its work [5, 8].
*   Fresh AI sessions with clean context and a comprehensive **handoff document** often outperform long-running, "stale" sessions that suffer from fragmentation [9].
*   Using a **single source of truth** (like a spec document) is vital when working across multiple AI tools (e.g., Claude, Cursor, Copilot) to prevent design drift and context loss between platforms [10, 11].

**Important Details and Techniques**

*   **Split Discovery from Documentation:**
    *   Avoid asking an AI to analyze and produce polished output in a single pass, as the model may run out of "attention" and cut corners [12, 13].
    *   **Example:** In the "Quality Playbook" project, the author split a requirement-generation task into two prompts: one to identify "behavioral contracts" in a list (`CONTRACTS.md`) and a second to derive requirements from that list [8, 14].
*   **Use Handoff Documents, Not Continuation Prompts:**
    *   When a session feels slow or the AI starts contradicting itself, users should ask the AI to write a **handoff document** before closing the session [15, 16].
    *   This document acts as a **state snapshot**, containing the current state, uncommitted changes, immediate next tasks, and file locations so a fresh session can pick up the work "cold" [9].
*   **Give the AI an Acceptance Criterion, Not a Procedure:**
    *   Instead of listing steps (which the AI might skip or merge), define exactly what **"done" looks like** [7, 17].
    *   **Example:** Rather than telling an AI to "run four iterations," tell it: "You are done only when the output file contains the cumulative findings from all four passes" [6, 18]. This allows the AI to check its own progress based on current state rather than history [7].
*   **Use Spec Documents as the Bridge Between AI Tools:**
    *   Maintain a shared contract that all tools read from. Never provide an AI coder with information that has not first been recorded in the specifications [11, 19].
    *   Include the **rationale and intent** behind requirements in these specs to help the AI handle edge cases correctly [11].
*   **Standardizing AI-Readable Context:**
    *   The author utilizes emerging standards like **`AGENTS.md`** (for project context) and **`CONTEXT.md`** (as a bootstrapping document) to ensure any new AI session can quickly align with the project's rules and history [20, 21].
    *   These practices were successfully applied even to non-technical tasks, such as managing the backlog and process for the article series itself [21, 22].