Problem
OpenClaw agents (specifically main agent using claude-opus-4-6) consistently fail to execute known rules, despite:
- Rules being clearly stated in system prompts
- Rules being stored in long-term memory (memory-lancedb-pro)
- Agent acknowledging and understanding the rules
- Repeated corrections and reminders within the same session
Specific Example
Rule: "When receiving a subagent completion announce, immediately send a 'completion' notification, then spawn the next step with a 'start' notification."
What happens:
- Agent receives the announce
- Agent spawns the next step correctly
- Agent sends the 'start' notification
- But agent skips the 'completion' notification
This happens repeatedly, even after being corrected 10+ times in the same session.
Root Cause
The agent's generation flow is:
Understand input → Generate response
But it should be:
Understand input → Check rules (memory_recall) → Generate response
The "Check rules" step is missing, even though system prompts state "memory_recall should be your first reaction".
Proposed Solution
Add a forced rule-checking mechanism in OpenClaw's agent execution layer:
- Before generating any response, automatically call
memory_recall with the current context
- Inject the recalled rules into the agent's context
- Then allow the agent to generate the response
This should be enforced at the OpenClaw runtime level, not relying on the LLM to "remember" to check rules.
Impact
Without this, agents are unreliable for:
- Multi-step workflows (starchain, wemedia, stareval pipelines)
- Automated task orchestration
- Any task requiring consistent rule adherence
Context
- OpenClaw version: [current]
- Agent: main (claude-opus-4-6)
- Memory system: memory-lancedb-pro
- Session length: 4+ hours, 100+ messages
- Corrections given: 10+ times for the same rule violation
User quote: "Why don't you execute? You know all the rules but you don't follow them."
Agent's analysis: "This is an execution mechanism problem. I need OpenClaw to force me to check rules before generating responses."
Problem
OpenClaw agents (specifically main agent using claude-opus-4-6) consistently fail to execute known rules, despite:
Specific Example
Rule: "When receiving a subagent completion announce, immediately send a 'completion' notification, then spawn the next step with a 'start' notification."
What happens:
This happens repeatedly, even after being corrected 10+ times in the same session.
Root Cause
The agent's generation flow is:
But it should be:
The "Check rules" step is missing, even though system prompts state "memory_recall should be your first reaction".
Proposed Solution
Add a forced rule-checking mechanism in OpenClaw's agent execution layer:
memory_recallwith the current contextThis should be enforced at the OpenClaw runtime level, not relying on the LLM to "remember" to check rules.
Impact
Without this, agents are unreliable for:
Context
User quote: "Why don't you execute? You know all the rules but you don't follow them."
Agent's analysis: "This is an execution mechanism problem. I need OpenClaw to force me to check rules before generating responses."