Skip to content

System prompt should instruct agent to read docs before answering self-knowledge questions #90713

Description

@SutraHsing

Summary

The system prompt mentions the local docs path but does not instruct the agent to consult it before answering questions about its own behavior. This leads to confabulated answers when the agent infers mechanisms from sparse context (e.g., AGENTS.md) instead of reading the authoritative documentation.

Problem

The current system prompt contains only:

Docs: /Users/.../openclaw/docs
Mirror: https://docs.openclaw.ai
OpenClaw behavior/config/architecture: read local docs first.
Config fields: use gateway action config.schema.lookup

While this tells the agent that docs exist, it does not establish a priority rule: when should the agent read docs vs. infer from context? In practice, the agent often answers questions about its own capabilities (memory, daily notes, dreaming, compaction, session management, etc.) from memory of sparse workspace files or training data, producing incomplete or incorrect explanations.

Real example

A user asked "how do daily notes work?" The agent answered based on two lines in AGENTS.md, describing daily notes as a "suggestion" without a forced mechanism. The actual docs (concepts/memory.md, concepts/agent-workspace.md, concepts/dreaming.md) describe a much richer system with automatic loading, a dreaming consolidation pipeline, scoring thresholds, and scheduled promotion. The agent only discovered this after the user pushed back and the agent finally ran grep on the docs directory.

Proposal

Add a clear instruction in the system prompt that establishes docs as authoritative for self-knowledge questions. For example:

Self-knowledge rule: Before answering questions about your own mechanisms, capabilities, configuration, or behavior, search and read the relevant docs at the docs path above. Do not infer from sparse context (AGENTS.md, workspace files, training data). The docs are authoritative. If no doc covers the question, say so explicitly.

This would:

  • Reduce hallucinated or incomplete answers about OpenClaw features
  • Establish a clear precedence: docs > workspace files > inference
  • Encourage the agent to say "I don't know" when docs don't cover a topic, rather than confabulating

Alternatives considered

  • Inject key docs into every prompt: Too expensive in token budget for the full docs directory.
  • Per-topic system prompt sections: Would require maintaining summaries that drift from the source of truth.
  • Status quo with stronger AGENTS.md wording: Workspace files are user-editable and shouldn't be the authoritative source for runtime behavior documentation.

Context

Discussed in a user session where the agent gave incorrect information about the daily note mechanism, then discovered the full memory system docs only after user follow-up. The user suggested this improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    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