RetentaRetenta
The sixth primitive

Five loop primitives ship in your harness. Retenta is the sixth.

Loop engineering means designing loops that prompt agents — scheduled, unattended, iterating. Five of the six primitives now ship inside Claude Code and Codex. The sixth — memory — is still a markdown file. A capsule is that memory, productized: writable, semantic, ordered, and neutral across every harness.

The agent forgets. The Capsule doesn't.

The six loop primitives

1
Automationsscheduled, unattended runs
ships in your harness
2
Worktreesisolated parallel workspaces
ships in your harness
3
Skillsauthored, reusable capabilities
ships in your harness
4
Connectors (MCP)tools & data over one protocol
ships in your harness
5
Sub-agentsfan-out delegation
ships in your harness
6
Memory / statetoday it's a markdown file — Retenta is the sixth
the gap

Why a capsule beats the markdown file

Markdown is honest — deterministic, ordered, diffable, legible at a glance. A capsule keeps those and adds what a file can't.

Semantic, not flat

Recall the relevant prior state by meaning — not by grepping a growing file that eventually blows the context window.

Ordered & deterministic

An ordered progress ledger — the “what's next” a markdown file is good at — read strongly-consistently, so a cold-started run sees its own last write immediately.

Neutral across harnesses

Reachable over MCP and REST from Claude Code and Codex alike. The memory isn't locked to the harness the loop happens to run in.

Durable & provable

Survives process kills, machines, and vendors. Citations back to sources; every read and write scoped to one capsule.

The loop, in four tools

recall

Load the whole spine in one call at the start of a run — open items + ordered progress + relevant memory.

log_progress

Append an ordered entry at every milestone — done · next · blocked.

remember

Save a synthesized finding; topic keeps one current note per subject (last-write-wins).

search / ask

Query the knowledge itself, with citations back to sources.

The retenta-memory skill teaches an agent to use them in order — recall at the start, log_progress at each milestone, remember for findings, cite sources — so it triggers automatically on loop and scheduled tasks.

Install for your harness

Copy your capsule's MCP URL and a named access key from its Connect box (create a key per harness under “Keys for loops & automations” — a Claude Code loop and a Codex loop each hold their own, independently revocable).

Claude Code

Plugin bundles the connector + skill.

export RETENTA_MCP_URL="https://mcp.retenta.ai/c/<slug>/mcp"   # from the Connect box
export RETENTA_API_KEY="rk_live_…"                               # a named owner key

/plugin marketplace add thecrownjoel/retenta
/plugin install retenta-memory@retenta

Codex

Native remote MCP + the loop skill.

export RETENTA_KEY="rk_live_…"                                   # a named owner key

codex mcp add retenta \
  --url https://mcp.retenta.ai/c/<slug>/mcp \
  --bearer-token-env-var RETENTA_KEY

mkdir -p ~/.agents/skills/retenta-memory
# save the retenta-memory SKILL.md there, then use  $retenta-memory

A nightly triage loop (any harness or cron)

The same tools over plain REST — recall the spine, do the work, log each step, remember the finding.

BASE="https://mcp.retenta.ai/c/<slug>"; KEY="rk_live_…"; RUN="$(date +%Y%m%d)"
auth(){ curl -s -H "Authorization: Bearer $KEY" -H "content-type: application/json" "$@"; }

# 1. load the whole spine at the start of the run
auth "$BASE/recall" -d '{"query":"nightly triage: what is open?"}'

# 2. …do the work…

# 3. record each milestone (idempotencyKey makes an at-least-once retry a safe no-op)
auth "$BASE/log_progress" -d '{"step":"triaged CI","status":"done","runId":"'$RUN'","idempotencyKey":"'$RUN'-triage"}'
auth "$BASE/log_progress" -d '{"step":"flaky test in the auth suite","status":"next","runId":"'$RUN'"}'

# 4. remember the synthesized finding (topic = one current note, last-write-wins)
auth "$BASE/remember" -d '{"text":"CI green; 1 flaky test remains","topic":"ci-status","runId":"'$RUN'"}'

Want proof it survives a kill? scripts/loop-demo.mjs runs three cycles as separate processes and shows cycle 3 recalling cycles 1–2.

Give your loop a memory.

Build a capsule, connect it to your harness, and stop losing what the last run learned.