OpenClaw Self-Improvement Loop: Turn Errors and Corrections into Reusable Workflow Memory
This case uses the self-improving-agent skill to log failures, corrections, and feature gaps, then promotes recurring patterns into OpenClaw workspace files for cross-session improvement.
Tags
Target users
What it does
- Logs command failures, user corrections, knowledge gaps, and missing features into
.learnings/ERRORS.md,.learnings/LEARNINGS.md, and.learnings/FEATURE_REQUESTS.md. - Promotes recurring lessons into
AGENTS.md,TOOLS.md, orSOUL.mdso OpenClaw injects them into future sessions automatically. - Uses OpenClaw session tools to share learnings across active sessions instead of trapping them inside one chat.
- Keeps project-specific learnings lightweight while turning stable patterns into reusable team rules or new skills._
Skills You Need
Pain Point
Without a structured feedback loop, OpenClaw sessions repeat avoidable mistakes. Corrections stay buried in chat history, tool failures are rediscovered by trial and error, and team conventions drift because nothing promotes one-off fixes into durable workspace rules.
Core value of this case
This case turns scattered feedback into operating memory. The agent stops treating corrections as disposable conversation and starts routing them into the right layer: unresolved items stay in .learnings/, reusable workflow rules move to AGENTS.md, tool gotchas move to TOOLS.md, and behavioral guidance moves to SOUL.md.
That gives teams three practical gains:
- Fewer repeated failures on the same commands, APIs, or output formats.
- Faster session recovery because stable rules are injected at bootstrap instead of re-explained manually.
- Cleaner governance for multi-agent work, because handoff lessons become shared protocol instead of private memory.
Typical scenarios
- A coding agent keeps formatting commit messages the wrong way. The correction is logged once, then promoted to
SOUL.mdso later sessions follow the same style by default. - A recurring tool failure needs the same workaround every week. The failure goes into
ERRORS.md, the verified fix moves intoTOOLS.md, and future sessions avoid the same dead end. - A multi-agent team loses context during handoff. The delegation mistake is promoted to
AGENTS.md, so later spawned sessions inherit the same reporting contract. - Repeated feature requests reveal a stable workflow pattern. Instead of leaving it as notes, the team extracts it into a reusable skill scaffold.
How to setup
- Install the skill:
Or install manually:
- Create the learning directory in the OpenClaw workspace:
-
Add the three log files, either by copying the skill templates or creating them yourself:
LEARNINGS.mdfor corrections, knowledge gaps, and best practicesERRORS.mdfor command failures and exceptionsFEATURE_REQUESTS.mdfor missing capabilities users ask for
-
Define promotion rules in workspace memory:
AGENTS.mdfor workflow and delegation improvementsTOOLS.mdfor tool-specific gotchas and verified fixesSOUL.mdfor behavioral preferences and communication rules
-
If you want reminders at session start, install the optional hook:_
- Verify the setup:
Archived Materials
The minimal file layout matters because it separates raw learnings from promoted rules:
Promotion targets from the source:
- Workflow improvements ->
AGENTS.md - Tool gotchas ->
TOOLS.md - Behavioral patterns ->
SOUL.md - Repeated patterns -> extract into a reusable skill with
scripts/extract-skill.sh
Related Links
- ClawHub: self-improving-agent
- OpenClaw Skills Repo: self-improving-agent
- OpenClaw integration reference
- Aliyun guide: OpenClaw deployment with self-improving-agent
- CNBlogs guide recommending self-improving-agent as a starter skill
FAQ
When should a learning stay in .learnings/?
Keep it there when the issue is project-specific, still unverified, or not useful outside the original task. Promote only rules that should shape future sessions.
Is this the same as semantic memory search?
No. This case governs what gets logged and promoted. Memory search helps retrieve stored context, but it does not decide which corrections become durable operating rules.
Do I need the hook for this to work?
No. The hook only adds automatic reminders. The core loop still works if you log entries manually and review them during normal OpenClaw work.
When does it make sense to extract a new skill?
When the same fix or workflow pattern keeps recurring across tasks, repos, or teammates. At that point, the source repo's extract-skill.sh script is a better long-term container than another note in .learnings/.
