Skip to content

active-memory: bloated prompt — full agent system prompt included in memory search context #66060

@ttomiczek

Description

@ttomiczek

Bug

The active-memory plugin passes the full agent system prompt (skills, tools, behavioral instructions, SOUL, etc.) to the memory search model (gemma-4-31b-it). This is unnecessary — the memory search agent only needs the recent conversation context, not the full agent configuration.

Root cause

The memory search prompt appears to include the entire agent bootstrap context:

  • System prompt with tools, skills, instructions
  • SOUL, AGENTS.md, identity configuration
  • All active skill declarations

When Gemma only needs: "here is the recent conversation, return relevant memories."

Impact

  • Token bloat: Full agent context is often 5-10x larger than needed
  • Slower generation: More tokens to process = slower response from Gemma
  • Higher cost: Unnecessary token usage on every active-memory call
  • Timeout risk: Larger prompts take longer to process, increasing chance of 15s timeout

Expected behavior

The memory search agent should receive a lean prompt containing only:

  • Its role as memory search agent
  • The recent conversation context (or relevant excerpt)
  • Instructions to return only relevant memories

The full agent system prompt, skill declarations, tool listings, and behavioral instructions are not needed for memory search and should be stripped.

Environment

  • OpenClaw v2026.4.12
  • active-memory plugin: enabled
  • Model: openrouter/google/gemma-4-31b-it
  • active-memory promptStyle: balanced (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions