Skip to content

Agent fails to execute rules despite knowing them - need forced rule checking mechanism #43295

Description

@mouseroser

Problem

OpenClaw agents (specifically main agent using claude-opus-4-6) consistently fail to execute known rules, despite:

  1. Rules being clearly stated in system prompts
  2. Rules being stored in long-term memory (memory-lancedb-pro)
  3. Agent acknowledging and understanding the rules
  4. 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:

  1. Before generating any response, automatically call memory_recall with the current context
  2. Inject the recalled rules into the agent's context
  3. 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."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions