Correction Memory for Openclaw

A persistent memory system that logs agent corrections and automatically injects them into future sessions to prevent recurring errors.

donovanpankratz-del
v1.1.0
Feb 26, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install correction-memory

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install correction-memory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Correction Memory?

Correction Memory is a specialized utility for Openclaw Skills designed to solve the persistent issue of agents repeating the same mistakes across different sessions. Typically, when an agent's output is corrected, that knowledge is lost once the session ends. This skill bridges that gap by providing a dedicated logging and injection mechanism that captures feedback and applies it to every future spawn of the same agent type.

By integrating the correction-tracker library into your workflow, you transform ephemeral corrections into a permanent knowledge base. Whether you are enforcing specific coding standards or stylistic preferences, this skill ensures your agents evolve and improve over time rather than resetting to a baseline state with every new task.

Correction Memory Use Cases

  • Eliminating repetitive formatting or syntax errors in generated code.
  • Enforcing project-specific architectural patterns that agents frequently ignore.
  • Training creative writing agents to maintain consistent style and tone across multiple chapters.
  • Reducing manual prompting overhead by automating the delivery of previous feedback.

How Correction Memory Works

  1. The system captures corrections via programmatic calls or natural language instructions provided to the main agent.
  2. Corrections are logged into structured .jsonl files categorized by agent type within the memory directory.
  3. When a subagent is spawned, the agent-context-loader identifies the agent type (e.g., CoderAgent) from the task description.
  4. The system queries the correction log for entries associated with that agent type from the last 30 days.
  5. A correction preamble is generated and prepended to the agent's prompt, ensuring past lessons are top-of-mind for the current task.

Correction Memory Setup

To install this capability for your Openclaw Skills setup, follow these steps:

Step 1: Install the Tracker

Copy the tracker template to your local workspace:

cp references/correction-tracker-template.js $OPENCLAW_WORKSPACE/lib/correction-tracker.js

Verify the installation:

node $OPENCLAW_WORKSPACE/lib/correction-tracker.js

Step 2: Integration

If you are already using the intent-engineering skill, the injection hook into agent-context-loader.js is automatic. If not, you must manually import buildCorrectionPreamble from the tracker library into your custom spawn logic.

Correction Memory Data Schema & Taxonomy

The skill maintains a flat-file database using JSONL for high performance and transparency. Data is stored in $OPENCLAW_WORKSPACE/memory/corrections/[AgentType].jsonl.

Field Description
agent_type The category of agent receiving the correction (e.g., CoderAgent, AuthorAgent)
issue A description of the incorrect behavior observed
correction The specific rule or instruction to follow in the future
timestamp Used to manage the 30-day auto-expiration of stale rules
metadata Optional context such as session ID or communication channel

Correction Memory Advanced Features

  • Auto-expiration logic that removes corrections older than 30 days to prevent prompt bloat.
  • Natural language processing that allows you to log corrections by simply telling the main agent what went wrong.
  • Keyword-based agent type detection that automatically routes corrections to the correct library.
  • Seamless interoperability with other Openclaw Skills to create a cohesive autonomous agent environment.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*