# 26.6 Memory outside the window, scoped per person and company (/building-ai-workers/context-engineering/memory-outside-the-window)

---
type: Document
title: "26.6 Memory outside the window, scoped per person and company"
description: "Which kind of knowledge goes where outside the window, what the progress file holds, and why a note is never a rule."
status: stable
order: 326.06
ksor:
  owner: team:panaversity
  audience:
    - public
  approval:
    by: process:panaversity
    at: 2026-11-30T08:16:25Z
chapter: '26'
part: III
expert_status: manager
concepts: [ "26.6" ]
last_verified: '2026-11-30'

sources:
  - id: anthropic-memory-tool
    title: Memory tool (Anthropic, verified 2026-11-29)
    resource: https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool
  - id: anthropic-managed-agents-memory
    title: Using agent memory (Claude Managed Agents, verified 2026-11-29)
    resource: https://platform.claude.com/docs/en/managed-agents/memory
  - id: anthropic-long-running-harnesses
    title: Effective harnesses for long-running agents (Anthropic, verified 2026-11-29)
    resource: https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
generated:
  at: 2026-11-30T08:16:25Z
  by: esl-rewrite/1.2.0+ksor.1
trust_tier: unverified
build_id: sha256:d6ce3f28a2cf8e492a60bae1b426b7cc6466e35e83d70c3b9763db2c55009f4b
dirty: true
ksor_version: 0.0.60
---

**In everyday life.** A tailor's shop keeps three kinds of paper. The price list and the shop's rules hang on the wall, and they hold for every customer. Each order has its own ticket. It holds the customer's request in their own words, the measurements as they were taken that day, and a mark beside each finished step. And the tailor keeps a notebook of things learned over the years, such as which cloth shrinks. A new assistant who walks in at noon can finish a jacket from the wall and the ticket. No line in the notebook ever changes a price on the wall. And one customer's ticket is never pinned to another customer's cloth.

**What you will learn.** You practice this in Lab 26, Task 2.

- What lives outside the window, and which kind goes where?
- What writes the progress file, and what does each entry hold?
- Why one store for each person and company?
- Can a note ever be a rule?

**Why it matters.** Whatever exists only inside the window can be cut. Each of the three kinds needs a home outside it. A note for later sessions is a fourth thing, with less authority than any of them.

**At work.** Friday's review kept its decisions in one place, the worker's own turns, and the summary replaced them. On Monday, May 3, 2027, at 8:40 a.m., you read the failed check and give the state of the work a home. From now on the worker writes each decision to a progress file as it makes it. The file sits in a folder that belongs to one person at one company: Dave Kowalski, at Brightline. Its first lines are Dave's request, word for word, with "with the policy line for each" in it.

### What lives outside the window, and which kind goes where?

**Rules go in the worker's instructions, the state of the work goes in a file, and evidence stays in the business system.**

| What it is | Its home outside the window | Who writes it there |
| --- | --- | --- |
| A rule | The worker's instructions | The builder, before the run |
| The state of the work, with the request at its top | A **progress file**: a file outside the window that holds each decision made so far | The worker asks, and the builder's code writes |
| Evidence | Brightline's own records, behind the connector | Nobody. It is fetched again |
| A note for later sessions | A memory store | The worker, in a store the builder chose |

The progress file is not the record of the work. As [23.16](../hosted-agents/loops-check-feedback-and-stop.md) said, that record "lives in your product, not in the session's history and not in a memory store". The finished review is the result, and the product's record holds it. The progress file is working state for one run, and it has done its job when the run ends. Chapter 31 lists four kinds of state a worker keeps for weeks ([31.8](../self-improving-ai-workers/memory-never-overrides-policy.md)). The progress file is none of the four, because it lasts for one run.

### What writes the progress file, and what does each entry hold?

**The builder's code writes it, when the worker asks through the memory tool.** The worker's four connector tools only read, and its instructions say it must never change anything at Brightline. So the file cannot be Brightline's data, and the worker cannot write it alone. The **memory tool** is a tool that lets the model keep files between requests. It "operates client-side: Claude requests file operations, and your application runs them."[^anthropic-memory-tool] Your function that receives each file request is the **handler**. The model sees paths under `/memories`, which is "a prefix that your handler maps onto real storage, such as a per-user directory or keys in a database."[^anthropic-memory-tool] No Brightline record changes.

The file follows a pattern from the same documentation, written for work that runs across many sessions. It keeps "a progress log" beside "a feature checklist", and the worker is told to "Work on one feature at a time. Mark a feature complete only after end-to-end verification".[^anthropic-memory-tool] For a review, the checklist is the list of open invoices, and one item is one invoice:

```text
REQUEST (Dave Kowalski, Friday, April 30, 2027, 4:10 p.m.):
"Tell me which open invoices are a problem, and why, with the policy line for each."

INV-8303  done
  decision: a problem. The invoice is $900.00 over its purchase order.
  seen:     PO-7003 $12,000.00, invoice $12,900.00
  line:     (file.md:N)
```

<!-- OPEN: the entry above shows the shape only. INV-8303 and PO-7003 are the book's facts (17.6, 24.2), but the spec does not say INV-8303 is open on April 30, 2027, and no policy file and line is given for it. The recorded run must supply a real open invoice and its real line. The progress file's name and folder are also not fixed (spec appendix, point 8). -->

<!-- EDITOR: which value does a progress file entry keep? This draft keeps the sample above, with a purchase order's amount, and the lab asks for "the values you decided on, such as the vendor's terms or the purchase order's amount", so the page has one shape. The other option: change the sample to show the vendor's terms, as the lab's first draft asked. Either way the entry's shape and the file's name go into `specs/labs/part-2-facts.md` before the lab is built. -->

Each entry has three parts, and each is there for a reason:

- *The decision,* because nothing else holds it. The connector cannot return a decision.
- *The value it was made on,* because a record that is fetched again may have changed (26.3). If the purchase order is corrected on Monday, the entry still shows what the worker saw on Friday.
- *The policy line, for an invoice the review calls a problem,* because the rule asks for one for each of them. The worker writes the review from these entries.

An invoice is marked done only when its decision and the value are written, and its policy line too if it is a problem. A checklist also stops a failure that the vendor's engineers describe in long work. A later session "would look around, see that progress had been made, and declare the job done."[^anthropic-long-running-harnesses] Section 26.4 says what brings the file back after a summary.

A short run with one decision needs no progress file at all. The file is worth its cost when a cut can come before the work is done.

### Why one store for each person and company?

**Because the handler is your code, so nothing but your code keeps one company's file away from another.** The model asks for `/memories` and cannot see where that leads. In Lab 26 the handler maps it to one folder, for the person and the company the run was started for. Your code sets that folder, and never takes it from anything in the conversation. That is [23.11](../hosted-agents/one-session-one-person-one-company.md)'s rule, applied to one more resource.

<!-- EDITOR: whose memory folder is it in Lab 26? This draft: one folder for the person and the company the run was started for, set by the builder's code, which in the story is Dave Kowalski at Brightline (26.6, "At work"), because the spec has the handler map `/memories` to a folder for one person and one company, and on the reader's own loop nobody signs in. The other option: the folder is chosen from the signed-in person and their company, which needs the review to run in the portal or on the hosted worker. It follows the runtime decision in the EDITOR comment under "What you will build". -->

Cedar Ridge Supply is the second company on Brightline's portal. It and Brightline each have a vendor V001, and they are different companies (23.11). Suppose a store is shared across companies, and Brightline's review writes a line about "V001". A Cedar Ridge session would read that line as if it were about Cedar Ridge's vendor. That leak needs no mistake by the model. A memory store shared across companies is a fault in the design, whatever the worker does with it.

A hosted platform offers the same idea under another name. On Claude Managed Agents, a memory store is "mounted as a directory inside the session's sandbox". The sandbox is the closed machine the platform runs the session in. A store "can only be attached at session creation time". The documentation names the fitting use: "one store for each end user, team, or project". The feature is in beta.[^anthropic-managed-agents-memory]

A store has a price. Every file in it is business data that someone must protect and delete (22.7). And a store the worker can write to can be poisoned. A prompt injection is text planted in data to give the worker orders. The same documentation warns that "a successful prompt injection could write malicious content into the store. Later sessions then read that content as trusted memory."[^anthropic-managed-agents-memory] Chapter 28 defends against that.

### Can a note ever be a rule?

**No. A note is something the worker wrote, and a rule is something the operator wrote.** A note such as "Dave wants the policy line for each invoice" would help the next review. The worker reads it as its own earlier words, not as an instruction, and only when it opens the file. The rule belongs in the instructions. When a note and a rule disagree, the rule wins, and Chapter 31 builds on that order (31.8).

**The operating rule:** rules in the instructions, the state of the work in a file for one person and one company, and notes below both.

**Do this now.** Ask your coding agent to sort what your own session holds. Copy this line:

> List what this session holds that exists nowhere outside it. Sort each item as a rule, a decision made so far, or something a tool could return again. For each rule and each decision, name the file where it should live. Change no file.

[^anthropic-memory-tool]: Memory tool, Anthropic.
[^anthropic-long-running-harnesses]: Effective harnesses for long-running agents, Anthropic.
[^anthropic-managed-agents-memory]: Using agent memory, Claude Managed Agents, Anthropic.
