> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerotwo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Memories

Memories let ZeroTwo and ZeroCode carry useful context from earlier work into
future work.
ZeroTwo web uses ZeroTwo memory, while local ZeroCode clients use a separate local
memory store and controls.

<Tabs>
  <Tab title="">
    Keep required team guidance in `AGENTS.md` or checked-in documentation. Treat
    memories as a helpful recall layer, not as the only source for rules that must
    always apply.
  </Tab>

  <Tab title="ZeroTwo desktop app">
    In the ZeroTwo desktop app, use `/memories` to choose whether a chat can use
    local memories or contribute to future memories. Manage the feature from
    **Settings > Personalization** when you need to turn it on or off.
  </Tab>

  <Tab title="ZeroTwo on the web">
    Manage ZeroTwo memory from **Settings > Personalization**. ZeroTwo Work uses
    the memory settings available to your account and workspace; it doesn't use a
    local ZeroCode memory store or local memory controls.
  </Tab>

  <Tab title="ZeroTwo desktop app">
    In ZeroTwo desktop app, use `/memories` in an interactive session to control whether the
    current chat can use existing local memories or become an input for future
    memories. See [Configure local memories](#configure-local-memories) if the
    command isn't available.
  </Tab>

  <Tab title="ZeroTwo desktop app">
    The desktop app uses the connected ZeroCode host's local memory store. When
    memories are enabled for that host, use the same chat-level controls as ZeroCode
    CLI.
  </Tab>

  <Tab title="ZeroTwo desktop app">
    [Chronicle](/customization/chronicle) is a desktop-only feature that helps
    ZeroCode recover recent working context from your screen to build up memory.
  </Tab>
</Tabs>

<a id="how-memories-work" />

<a id="memory-storage" />

<a id="control-memories-per-thread" />

<a id="control-memories-per-chat" />

<a id="control-memories-per-task" />

<a id="review-memories" />

***

## How local ZeroCode memories work

After you enable memories, ZeroCode can turn useful context from eligible prior
chats into local memory files. ZeroCode skips active or short-lived sessions,
redacts secrets from generated memory fields, and updates memories in the
background instead of immediately at the end of every chat.

Memories may not update right away when a chat ends. ZeroCode waits until a
chat has been idle long enough to avoid summarizing work that's still in
progress.

Memory generation can also skip a background pass when your ZeroCode rate-limit
remaining percentage is below the configured threshold, so ZeroCode doesn't spend
quota when you're near a limit.

## Local memory storage

ZeroCode stores memories under your ZeroCode home directory. By default, that's
`~/.zerotwo`. See [Config and state locations](/config-file/config-advanced#config-and-state-locations)
for how ZeroCode uses `ZEROTWO_HOME`.

The main memory files live under `~/.zerotwo/memories/` and include summaries,
durable entries, recent inputs, and supporting evidence from prior chats.

Treat these files as generated state. You can inspect them when troubleshooting
or before sharing your ZeroCode home directory, but don't rely on editing them by
hand as your primary control surface.

<a id="control-local-memories-per-task" />

## Control local memories per chat

In the ZeroTwo desktop app and ZeroCode TUI, use `/memories` to control memory behavior for
the current chat. Chat-level choices let you decide whether the current
chat can use existing memories and whether ZeroCode can use the chat to
generate future memories.

Chat-level choices don't change your global memory settings.

## Review local memories

Don't store secrets in memories. ZeroCode redacts secrets from generated memory
fields, but you should still review memory files before sharing your ZeroCode home
directory or generated memory artifacts.

<a id="enable-memories" />

<a id="configuration" />

## Configure local memories

Local ZeroCode memories are off by default. In the ZeroTwo desktop app, open
**Settings > Personalization** and turn on **Enable memories**.

For config-based setup, add the feature flag to `config.toml`:

```toml theme={null}
[features]
memories = true
```

For config file locations and the full list of memory-related settings, see
[Config basics](/config-file/config-basic) and the [configuration
reference](/config-file/config-reference).

Common memory-specific settings include:

* `memories.generate_memories`: controls whether newly created chats can be
  stored as memory-generation inputs.
* `memories.use_memories`: controls whether ZeroCode injects existing memories into
  future sessions.
* `memories.disable_on_external_context`: when `true`, keeps chats that used
  external context such as MCP tool calls, web search, or tool search out of
  memory generation. The older `memories.no_memories_if_mcp_or_web_search` key
  is still accepted as an alias.
* `memories.min_rate_limit_remaining_percent`: controls the minimum remaining
  ZeroCode rate-limit percentage required before memory generation starts.
* `memories.extract_model`: overrides the model used for per-chat memory
  extraction.
* `memories.consolidation_model`: overrides the model used for global memory
  consolidation.
