---
title: "Working Memory"
source: "/reference/working-memory"
description: "Working memory temporarily holds and manipulates information needed for the task currently in progress."
---
# Working Memory

Working memory temporarily holds and manipulates information needed for the task currently in progress.



### Principle

Working memory temporarily holds and manipulates information needed for the task currently in progress.

### Why it matters

Working memory is consumed when users compare options, transform values, remember instructions, track selections, or maintain context across screens. Interfaces can reduce that burden by keeping information visible and externalizing state. This is particularly important for unfamiliar, interrupted, mobile, or high-stakes tasks.

### Deeper design interpretation

Working memory supports the active manipulation of information during a task. It is consumed by comparison, sequencing, calculation, temporary state, and interruption recovery. Interfaces reduce this cost when they externalize state: selected items remain visible, totals are calculated, prior values persist, and users can review what has already been decided.

This matters particularly in mobile contexts, unfamiliar workflows, long-running tasks, and high-stakes operations. Interruptions are common, screens are smaller, and the cost of losing context is higher.

Layr should treat hidden state as a potential memory tax. When the product already knows the current selection, previous step, calculation, or job status, making the user reconstruct it is usually unnecessary.

### What the agent should reason about

Trace dependencies across time and views. If a later action requires information that is currently hidden, determine whether the system can safely persist and present it. Consider privacy before recommending persistent display of sensitive data.

A strong finding often links hidden state directly to an error mode: duplicate selection, wrong comparison, forgotten filter, repeated work, or inability to resume.

### Common failure patterns

- Multi-select state disappears when users paginate.
- A confirmation view omits the details needed to verify the action.
- Filters reset when navigating to an item and back.
- Users manually total values that the interface already has.
- Draft state exists server-side but the UI does not indicate that it was saved.

### Audit questions

- Which facts does the system already know that the user is being asked to remember?
- What happens after interruption or navigation?
- Can users verify accumulated state before committing?
- Would persistent context create privacy or clutter concerns that require a different presentation?

### Example agent finding

> **High — Bulk selection is invisible across pagination.** Users can select records on several pages, but the table shows neither a persistent count nor a review list. Preserve selection state and expose a reviewable summary before the bulk action so users do not have to remember what is included.

### Agent directive

> Externalize task state whenever the system already knows it. Do not require users to remember information that can be shown, preserved, or derived safely.

### Apply this when

- Multi-step forms, migrations, checkout, comparison, configuration, scheduling, data entry, code/OTP flows, and interrupted tasks.

### Observable signals

- A later step depends on values shown only earlier.
- Selections disappear when a panel closes even though they are still active.
- A summary omits information required to verify the final action.
- Users must manually total, compare, or reconcile values the system already has.
- Returning after interruption provides no indication of prior progress.

### Recommended actions

- Show persistent summaries and selected state.
- Carry forward safe values and provide review before commitment.
- Place comparison values side by side.
- Save progress where appropriate and make restoration visible.
- Provide copy, reveal, or history affordances for temporary values.

### Do not over-apply

Persistent context can create clutter or privacy concerns. Show what is needed for the current task and protect sensitive data appropriately.

### Example

**Weak:** A user selects five records across paginated pages, but the interface shows no persistent selection count or list.

**Stronger:** The selection state remains visible, can be reviewed, and survives pagination until the user clears or completes the action.

### Evaluation notes

- **Default severity:** Medium to high depending on error cost.
- **Typical confidence:** High when the interface requires recall across time or views.
- **Primary evidence:** State persistence, summaries, screen transitions, hidden selections, task dependencies.
- **Related rules:** Cognitive Load, Chunking, Miller's Law, Zeigarnik Effect

### References

- [Laws of UX — Working Memory](https://lawsofux.com/working-memory/)

## Related rules

- [Cognitive Load](/__layr/pages/reference/cognitive-load.md)
- [Chunking](/__layr/pages/reference/chunking.md)
- [Miller's Law](/__layr/pages/reference/millers-law.md)
- [Zeigarnik Effect](/__layr/pages/reference/zeigarnik-effect.md)

## Agent guidance

Review criteria, the finding contract a report must use, and worked examples.

Established principle; Layr interpretation and agent guidance. Category: Memory & Cognition.

## Retrieve
- Canonical page: https://layr.design/reference/working-memory
- Markdown for agents: https://layr.design/__layr/pages/reference/working-memory.md
- Reference map: https://layr.design/llms.txt
- Route index: https://layr.design/__layr/routes.toon

## Rule object
```yaml
rule:
  id: "working-memory"
  title: "Working Memory"
  category: "Memory & Cognition"
  origin: established
  canonical_url: "https://layr.design/reference/working-memory"
  principle: "Working memory temporarily holds and manipulates information needed for the task currently in progress."
  directive: "Externalize task state whenever the system already knows it. Do not require users to remember information that can be shown, preserved, or derived safely."
  applies_when:
    - "Multi-step forms, migrations, checkout, comparison, configuration, scheduling, data entry, code/OTP flows, and interrupted tasks."
  observable_signals:
    - "A later step depends on values shown only earlier."
    - "Selections disappear when a panel closes even though they are still active."
    - "A summary omits information required to verify the final action."
    - "Users must manually total, compare, or reconcile values the system already has."
    - "Returning after interruption provides no indication of prior progress."
  audit_questions:
    - "Which facts does the system already know that the user is being asked to remember?"
    - "What happens after interruption or navigation?"
    - "Can users verify accumulated state before committing?"
    - "Would persistent context create privacy or clutter concerns that require a different presentation?"
  recommended_actions:
    - "Show persistent summaries and selected state."
    - "Carry forward safe values and provide review before commitment."
    - "Place comparison values side by side."
    - "Save progress where appropriate and make restoration visible."
    - "Provide copy, reveal, or history affordances for temporary values."
  avoid_when:
    - "Persistent context can create clutter or privacy concerns. Show what is needed for the current task and protect sensitive data appropriately."
  common_failure_patterns:
    - "Multi-select state disappears when users paginate."
    - "A confirmation view omits the details needed to verify the action."
    - "Filters reset when navigating to an item and back."
    - "Users manually total values that the interface already has."
    - "Draft state exists server-side but the UI does not indicate that it was saved."
  evidence_types:
    - "State persistence"
    - "summaries"
    - "screen transitions"
    - "hidden selections"
    - "task dependencies"
  default_severity: "Medium to high depending on error cost."
  typical_confidence: "High when the interface requires recall across time or views."
  related_rules:
    - { id: "cognitive-load", title: "Cognitive Load", url: "https://layr.design/reference/cognitive-load" }
    - { id: "chunking", title: "Chunking", url: "https://layr.design/reference/chunking" }
    - { id: "millers-law", title: "Miller's Law", url: "https://layr.design/reference/millers-law" }
    - { id: "zeigarnik-effect", title: "Zeigarnik Effect", url: "https://layr.design/reference/zeigarnik-effect" }
```

## What to reason about
Trace dependencies across time and views. If a later action requires information that is currently hidden, determine whether the system can safely persist and present it. Consider privacy before recommending persistent display of sensitive data. A strong finding often links hidden state directly to an error mode: duplicate selection, wrong comparison, forgotten filter, repeated work, or inability to resume.

## Routing
Route a review here when the user must remember, infer, translate, reconcile, or reconstruct information. These rules are especially relevant when the system already possesses context that the interface fails to expose.

## Review procedure
For every finding:
1. Identify the exact component, state, route, or interaction.
2. State the observable evidence.
3. Name the principle that applies.
4. Explain the user consequence in the current context.
5. Estimate severity from the consequence, frequency, and reversibility.
6. Recommend the smallest change that addresses the issue while preserving the product's existing design system.
7. Lower confidence when intent, frequency, audience, device, or product constraints must be inferred.
8. Do not produce generic advice such as "improve hierarchy" or "make this clearer" without specifying what is wrong and why.

## Finding contract — emit exactly this shape
```yaml
finding:
  rule_id: string
  location: string
  evidence:
    - observable fact
  impact: string
  severity: low | medium | high | critical
  confidence: low | medium | high
  recommendation:
    change: string
    rationale: string
    preserve:
      - existing design-system behavior
      - valid product constraints
```

## Example finding for this rule
High — Bulk selection is invisible across pagination. Users can select records on several pages, but the table shows neither a persistent count nor a review list. Preserve selection state and expose a reviewable summary before the bulk action so users do not have to remember what is included.

## Code reference

The same principle as markup. Compare the structure, not the class names.

```html
<!-- weak -->
<div class="example-ui example-ui-weak">
  <div class="scene-chrome">
    <span class="scene-chrome-app">Invoices</span>
    <span class="scene-chrome-view">All invoices</span>
  </div>
  <div class="scene-body">
    <div class="scene-panel">
      <span class="scene-panel-title">Invoices</span>
      <div class="scene-table-head">
        <span>Invoice</span>
        <span>Date</span>
      </div>
      <div class="scene-row">
        <span class="scene-check-row">
          <span class="scene-check"></span>
          <span class="scene-key">INV-114</span>
        </span>
        <span class="scene-meta">13 Sep</span>
      </div>
      <div class="scene-row">
        <span class="scene-check-row">
          <span class="scene-check"></span>
          <span class="scene-key">INV-118</span>
        </span>
        <span class="scene-meta">13 Sep</span>
      </div>
      <div class="scene-row">
        <span class="scene-check-row">
          <span class="scene-check"></span>
          <span class="scene-key">INV-122</span>
        </span>
        <span class="scene-meta">14 Sep</span>
      </div>
      <div class="scene-row scene-row-muted">
        <span class="scene-meta">Page 2 of 4</span>
        <span class="scene-meta">Selection cleared on page change</span>
      </div>
    </div>
    <span class="scene-note">No count · no list · selection lost on paginate</span>
  </div>
</div>
```

```html
<!-- stronger -->
<div class="example-ui example-ui-strong">
  <div class="scene-chrome">
    <span class="scene-chrome-app">Invoices</span>
    <span class="scene-chrome-view">All invoices</span>
  </div>
  <div class="scene-body">
    <div class="scene-panel">
      <span class="scene-panel-title">Invoices</span>
      <div class="scene-table-head">
        <span>Invoice</span>
        <span>Date</span>
      </div>
      <div class="scene-row">
        <span class="scene-check-row">
          <span class="scene-check scene-check-on"></span>
          <span class="scene-key">INV-114</span>
        </span>
        <span class="scene-meta">13 Sep</span>
      </div>
      <div class="scene-row">
        <span class="scene-check-row">
          <span class="scene-check scene-check-on"></span>
          <span class="scene-key">INV-118</span>
        </span>
        <span class="scene-meta">13 Sep</span>
      </div>
      <div class="scene-row">
        <span class="scene-check-row">
          <span class="scene-check scene-check-on"></span>
          <span class="scene-key">INV-122</span>
        </span>
        <span class="scene-meta">14 Sep</span>
      </div>
      <div class="scene-row scene-row-muted">
        <span class="scene-meta">Page 2 of 4</span>
      </div>
    </div>
    <div class="scene-sticky">
      <span class="scene-sticky-count">5 selected</span>
      <span class="scene-meta">3 on other pages</span>
      <span class="scene-action">Review selection</span>
    </div>
  </div>
</div>
```

```css
/* declarations these studies depend on */
.example-ui { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 17rem; overflow: hidden; border: var(--border-thin) solid var(--color-border-strong); background: var(--color-background); color: var(--color-text); font-size: var(--text-xs); line-height: var(--leading-snug); }
.example-ui .scene-chrome { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: var(--border-thin) solid var(--color-border-strong); background: var(--color-surface); }
.example-ui .scene-chrome-app { font-size: var(--text-2xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.example-ui .scene-chrome-view { color: var(--color-text-tertiary); font-size: var(--text-2xs); }
.example-ui .scene-body { display: grid; align-content: start; gap: var(--space-3); min-width: 0; padding: var(--space-3); }
.example-ui .scene-body:has(> .scene-panel:only-child) { align-content: stretch; }
.example-ui .scene-panel { display: grid; align-content: start; justify-items: start; gap: var(--space-2); min-width: 0; padding: var(--space-3); border: var(--border-thin) solid var(--color-border-strong); background: var(--color-surface-raised); }
.example-ui .scene-panel-title { font-size: var(--text-sm); font-weight: 600; letter-spacing: var(--tracking-heading); }
.example-ui .scene-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-1) var(--space-2); width: 100%; min-width: 0; padding-block: var(--space-1); }
.example-ui .scene-panel > .scene-row + .scene-row { border-top: var(--border-thin) solid var(--color-border-subtle); }
.example-ui .scene-row-muted { color: var(--color-text-tertiary); }
.example-ui .scene-meta { color: var(--color-text-tertiary); font-size: var(--text-2xs); }
.example-ui .scene-key { font-family: var(--font-mono); font-size: var(--text-2xs); }
.example-ui .scene-note { width: 100%; padding-top: var(--space-2); border-top: var(--border-thin) solid var(--color-border-subtle); color: var(--color-text-tertiary); font-family: var(--font-mono); font-size: var(--text-2xs); line-height: var(--leading-snug); }
.example-ui .scene-action { display: inline-flex; align-items: center; justify-content: center; min-height: var(--space-8); padding-inline: var(--space-3); border: var(--border-thin) solid var(--color-border-strong); border-radius: var(--radius-xs); background: var(--color-surface-raised); color: var(--color-text); font-size: var(--text-xs); font-weight: 550; white-space: nowrap; }
.example-ui .scene-check { display: inline-block; width: 13px; height: 13px; border: var(--border-thin) solid var(--color-border-strong); border-radius: var(--radius-xs); }
.example-ui .scene-check-on { border-color: var(--color-primary-bg); background: var(--color-primary-bg); }
.example-ui .scene-check-row { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.example-ui .scene-table-head { display: flex; justify-content: space-between; gap: var(--space-2); width: 100%; padding-bottom: var(--space-1); border-bottom: var(--border-thin) solid var(--color-border-strong); color: var(--color-text-tertiary); font-size: var(--text-2xs); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.example-ui .scene-sticky { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: var(--border-thin) solid var(--color-border-strong); background: var(--color-primary-bg); color: var(--color-primary-text); }
.example-ui .scene-sticky .scene-meta { color: var(--color-primary-text); opacity: 0.7; }
.example-ui .scene-sticky .scene-action { border-color: var(--color-primary-text); background: none; color: var(--color-primary-text); }
.example-ui .scene-sticky-count { font-weight: 600; }
.example-ui { min-height: 15rem; }

/* resolved values */
:root {
  --border-thin: 1px;
  --font-mono: "Geist Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --leading-snug: 1.35;
  --radius-xs: 2px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-8: 2rem;
  --text-2xs: 0.6875rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --tracking-heading: -0.025em;
  --tracking-label: 0.06em;
}
```

## Weak vs stronger
- Weak: A user selects five records across paginated pages, but the interface shows no persistent selection count or list.
- Stronger: The selection state remains visible, can be reviewed, and survives pagination until the user clears or completes the action.

## Reporting rules
- Report only what the interface shows as observable evidence; phrase psychological or motivational effects as possible consequences.
- Returning no finding is a valid result when evidence is insufficient.
