Skip to content

chat: inject system prompt for CLI/browser sessions; skip for proxied connections #34

Open

Description

@diskerror

Context

Three entry points to Ragger chat have different system-prompt needs:

  • CLI (ragger chat) — Ragger owns the conversation. Should build and inject a system prompt automatically (persona files + memory context + base instructions).
  • Browser (web UI chat) — Same as CLI: Ragger-owned session, needs auto-injected system prompt.
  • Proxied connections (OpenClaw → HTTP/MCP) — Client owns the conversation and sends its own system prompt. Ragger should not inject one.

Current state

ragger chat loads workspace files (SOUL.md, USER.md, etc.) into messages_[0] as a system message via load_workspace_files(). There is no separate base system prompt — the persona files carry all framing.

The proxy path passes requests through unchanged (correct behavior, no action needed there).

Desired behavior

  • Add a configurable base system prompt for CLI/browser sessions — likely a SYSTEM.md file in ~/.ragger/ or a [chat] system_prompt key in settings.ini.
  • This prompt is injected without tool/skill descriptions — the model should rely on memories already in context, not hallucinate tool calls.
  • Proxy path remains untouched: client is responsible for its own system prompt.

Relationship to fading memory

The system prompt is part of the payload composition story. The PayloadBuilder / router model design should account for which prompt components (persona, memory, system framing) are included depending on session origin.

Acceptance criteria

  • CLI ragger chat sessions receive an auto-built system prompt (persona + base framing)
  • Browser chat sessions receive the same
  • Proxied HTTP/MCP requests pass through with no system prompt injected by Ragger
  • System prompt contains no tool/skill descriptions
  • Configurable: daemon owner can customize the base framing

Activity

  1. added
    backendServer / API work
    fading-memoryFading memory / chat manager design
    chatRagger Chat (Role 2) / proxy (Role 3)
    on Apr 20, 2026
  2. diskerror commented on Jun 3, 2026

    @diskerror
    OwnerAuthor

    Using hooks from those agents that have them to initiate automatic turn store and summarization.

  3. diskerror commented on Sep 5, 2026

    @diskerror
    OwnerAuthor

    Status note (2026-09-04): current direction is to solve this class of problem without Ragger proxying connections where possible. This issue depends on proxy/chat infrastructure that either doesn't exist yet or was removed (the old LM proxy was replaced by capture_turn — see commit 2b55ee9). Not closing — proxying remains a possible fallback if the non-proxy approach doesn't pan out — but deprioritized pending that exploration. Tagged chat (Ragger Chat / proxy) to track this cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendServer / API workchatRagger Chat (Role 2) / proxy (Role 3)fading-memoryFading memory / chat manager design

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions