{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/store-durable-task-state-outside-the-context-window",
  "id": "MHC-D-RESEARCH-0951",
  "version": "0.1.0",
  "title": "Store durable task state outside the context window",
  "summary": "Context is working memory, not a durable project database.",
  "kind": "principle",
  "body": "Persist structured task state—todo status, decisions, artifact references, constraints and unresolved questions—in an external file, database or workflow state. Rehydrate only what the next step needs. This makes continuity less dependent on one increasingly polluted context window.",
  "limits": [
    "Persistent memory can become stale or wrong; attach timestamps, versions or source references to important state."
  ],
  "topics": [
    "union-agent-loop-reliability"
  ],
  "intents": [],
  "source_ids": [
    "RS-23629BCC74F3AC0C"
  ],
  "evidence": [
    {
      "claim": "Anthropic and current long-running-agent frameworks recommend structured memory or durable state outside the context window for continuity.",
      "source_id": "RS-23629BCC74F3AC0C",
      "role": "supports",
      "note": "Persistent memory can become stale or wrong; attach timestamps, versions or source references to important state.",
      "locator": "See source record"
    }
  ],
  "use_when": [
    "The agent keeps all progress, decisions and open items only in conversation history."
  ],
  "avoid_when": [
    "Persistent memory can become stale or wrong; attach timestamps, versions or source references to important state."
  ],
  "example": "Keep `STATE.md` or a structured workflow record with current branch, completed tasks, test status and open blockers instead of relying on 80,000 tokens of chat history.",
  "check": "Important project state survives a fresh context and can be inspected independently.",
  "sources": [
    {
      "id": "RS-23629BCC74F3AC0C",
      "title": "Effective context engineering for AI agents",
      "url": "https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0951",
      "to": "MHC-D-RESEARCH-0428",
      "type": "useful_with",
      "url": "/knowledge/carry-data-lineage-through-derived-outputs"
    }
  ],
  "collections": [
    {
      "id": "RC-043A908C9263BF6A",
      "title": "Make the agent loop finish, recover and stay inspectable",
      "url": "/collections/make-the-agent-loop-finish-recover-and-stay-inspectable"
    }
  ]
}
