---
created: 2026-05-06
gap: G07
order: 7
severity: P1
category: reliability
estimate: M
issue: "https://github.com/lidge-jun/agbrowse/issues/63"
depends_on: ['G02', 'G06', 'G11']
---

# G07 — Persistent action memory / repeatable action cache (vs Stagehand, AgentQL)

> Severity **P1** · Category `reliability` · Estimate **M** ·
> Tracking issue [#63](https://github.com/lidge-jun/agbrowse/issues/63) · Depends on **G02, G06, G11**

## GPT Pro evidence

Evidence (competitor side): URL: https://docs.stagehand.dev/v3/best-practices/caching — quote: “Cache actions automatically.” AgentQL also markets resilience to UI changes. 
Stagehand
+1

Evidence (agbrowse side): The truth table marks web-ai/self-heal.mjs ready, so the gap is not “no self-heal”; the gap is persistent replay/action memory. README.md:491-495 also says refs are scoped to the latest snapshot. 
GitHub

Why this matters: Repeat workflows should get faster and more reliable when the same page/action recurs. Without validated memory, every run pays the full observation and resolver cost again.
Proposed scope, respecting forbidden list:

web-ai/action-memory.mjs — store action intent, origin, DOM signature, target evidence, and last-good selector/ref.

web-ai/self-heal.mjs — consult memory only after signature validation; fall back to resolver on mismatch.

web-ai/target-resolver.mjs — emit cache hit/miss, validation signals, and replay reason codes.

skills/browser/browser.mjs — add action-memory list, action-memory clear, and --no-action-memory.

structure/commands.md — document cache as experimental and non-authoritative.

structure/release_gates.md — add gate:action-memory-safe-replay.
Test surface: test/unit + test/eval.
cli-jaw mirror impact: parity required if resolver/cache behavior is claimed cross-repo.
Acceptance gate: keep semantic resolver gates; add gate:action-memory-safe-replay.
Estimate: M, 2–3 days.

## Diff-level work breakdown

> Fill in concrete diffs (NEW / MODIFY / DELETE with file:line) once this gap
> reaches the active sprint. Until then, the bullets in **Proposed scope**
> above are the agreed shape; do not implement before the depending gaps
> (G02, G06, G11) ship and `gate:all` stays green.

### NEW files
- _to be filled before implementation_

### MODIFY
- _to be filled before implementation_

### DELETE
- _to be filled before implementation_

## Tests
- `test/unit/...` — _list test files once written_

## Truth-table update
- `structure/CAPABILITY_TRUTH_TABLE.md` — add row or update status when this
  gap reaches `ready` in agbrowse.
- `cli-jaw/structure/CAPABILITY_TRUTH_TABLE.md` — mirror entry per the
  `cli-jaw mirror impact` line above.

## Release gates touched
- Existing: `gate:typecheck`, `gate:tests`, `gate:truth-table-fresh`,
  `gate:mcp-scope-frozen`, `gate:no-experimental-in-readme-ready-section`.
- Added by this gap: see **Acceptance gate** in the GPT Pro evidence block.
