Skip to content

[Bug]: Hardcoded system prompt conflicts with AGENTS.md #29772

@jtatum

Description

@jtatum

Summary

The instructions in the hardcoded system prompt do not match the instructions in AGENTS.md.

Expected behavior

The prompts should not conflict with each other.

Actual behavior

The system prompt asks for selective memory reading via tool calls, while AGENTS.md instructs the agent to read entire files.

OpenClaw version

2026.2.26

Logs, screenshots, and evidence

OpenClaw's hardcoded system prompt in src/agents/system-prompt.ts says to use tools to get only needed lines from memory:

Before answering anything about prior work, decisions, dates, people, preferences, or todos: run memory_search on MEMORY.md + memory/*.md; then use memory_get to pull only the needed lines.

AGENTS.md says to just read the entire files directly:

Before doing anything else:
  1. Read SOUL.md
  2. Read USER.md
  3. Read memory/YYYY-MM-DD.md (today + yesterday)
  4. If in MAIN SESSION: Also read MEMORY.md

Impact and severity

The agent has to decide whether to follow the hardcoded system prompt instructions that return less context or the instructions in AGENTS.md which return more context. It's not clear which will win. The fact that AGENTS.md has these instructions at all though makes users assume they're not being contradicted elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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