Skip to content

Each mount has a local store. It holds the notes that the agent writes for a later session. It needs no config and no AWS account, so a mount with only mount_point still serves it.

The local store is not a source in the config. You can’t name a source local, and a [local] table is an error. It has its own page, _sources/local.md.

/tmp/ops-context/local/
memories/
3f2a9c1e/ the folder of one session
mitigation-plan.md
checkout-latency-diagnosis.md
build-steps.md a note with no session

Stash writes a note in local/memories/ when the agent saves one. Notes need [extraction] in the config.

A note keeps one topic past the end of the session, and past a compaction of the context window. The agent saves it with stash note save, or with the save_note tool in MCP mode:

Terminal window
stash note save ops --topic "checkout latency diagnosis" <<'NOTE'
Checkout p99 rose to 4 s after deploy 1182; the payments pool hit its limit
## Key facts
- The payments DB pool has 50 connections (true when: deploy 1182; evidence: pool metrics)
## Decisions
- Roll back deploy 1182 because the pool fix needs a review (decided by: person)
NOTE

A note has a title line, then up to four sections: ## Key facts, ## Workflows, ## Decisions, and ## Diagnosis. The CLI and the daemon both check it:

  • the topic has at most 200 characters;
  • the body has 1 to 16,000 characters;
  • the body has only those four section headings.

The file name comes from the topic: checkout-latency-diagnosis.md. A save with the same topic in the same folder replaces the note with the whole new text. Each session keeps its own notes, so two sessions can each have a note with one topic.

The session comes from the harness: CLAUDE_CODE_SESSION_ID, CODEX_THREAD_ID, KIRO_SESSION_ID, or, for the Strands integration, STRANDS_SESSION_ID.

Notes don’t count against cache_max_bytes. They’re never refreshed, and they never expire. Each one is a read-only file, and Stash keeps no other copy on the host.

With [extraction], the hooks ask the agent for a note after 45,000 tokens of new session text, at 4 characters for each token. The steering block has a Note-taking section that says what to record. See Local memory and Attachment modes.

[extraction]
enabled = true

A memory source with write.notes.namespace keeps a copy of each note as one record. Then the notes reach other hosts and other mounts:

[sources.incidents]
kind = "agentcore-memory"
arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:memory/ops-memory-0123456789"
auth = { sigv4 = {} }
write.notes.namespace = "/notes/ops/"

The key of each copy starts with a random store ID from $STASH_DATA_ROOT/mounts/NAME/store-id, so two hosts with the same mount name keep separate copies. The mount that saved a note shows it only once, as its file in local/memories/. See Feedback loops.

stash delete NAME keeps the notes. stash delete NAME --remove-data removes them with the rest of the mount point. To turn [extraction] or write.notes on or off, change the config and run stash update. The notes stay.