openclaw - 💡(How to fix) Fix Per-section gates for moot L1 prompt blocks (A6/A13/A14) + available_skills filter [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70892Fetched 2026-04-24 10:38:11
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Running a single-purpose trading pod on ghcr.io/openclaw/openclaw:2026.4.9. The base-image system prompt is ~35k chars of static preamble injected on every cold-start invocation. On a concrete measurement (captured via cllama's /internal/context/<agent>/snapshot), four sections contribute chars that our agents never act on:

sectionoffset in systemchars
## OpenClaw CLI Quick Reference3,922357
## Reply Tags8,685570
## Messaging (inline-components / forms / modals sub-block)9,2551,191
<available_skills>5,1422,301
subtotal~4,419 chars

Why they're moot for us:

  • CLI Quick Reference — our claws don't restart their own gateway or stop/start their own channels, so openclaw start/stop/status/etc. is irrelevant.
  • Reply Tags — we use the native message + tool-call path, no <think>/<final> streaming.
  • Messaging inline-components / forms / modals — we only send plain Discord text; no buttons, no forms, no modals.
  • <available_skills> — lists the generic base-image skills (discord, healthcheck, node-connect, skill-creator, weather) alongside operator-mounted ones. In a Discord-only trading pod, only discord is load-bearing; the other four are never called.

Root Cause

Running a single-purpose trading pod on ghcr.io/openclaw/openclaw:2026.4.9. The base-image system prompt is ~35k chars of static preamble injected on every cold-start invocation. On a concrete measurement (captured via cllama's /internal/context/<agent>/snapshot), four sections contribute chars that our agents never act on:

sectionoffset in systemchars
## OpenClaw CLI Quick Reference3,922357
## Reply Tags8,685570
## Messaging (inline-components / forms / modals sub-block)9,2551,191
<available_skills>5,1422,301
subtotal~4,419 chars

Why they're moot for us:

  • CLI Quick Reference — our claws don't restart their own gateway or stop/start their own channels, so openclaw start/stop/status/etc. is irrelevant.
  • Reply Tags — we use the native message + tool-call path, no <think>/<final> streaming.
  • Messaging inline-components / forms / modals — we only send plain Discord text; no buttons, no forms, no modals.
  • <available_skills> — lists the generic base-image skills (discord, healthcheck, node-connect, skill-creator, weather) alongside operator-mounted ones. In a Discord-only trading pod, only discord is load-bearing; the other four are never called.

Code Example

agents:
  defaults:
    prompt:
      includeCLIQuickReference: false     # "## OpenClaw CLI Quick Reference"
      includeReplyTags: false             # "## Reply Tags"
      includeMessagingComponents: false   # inline-components sub-block of "## Messaging"

---

agents:
  defaults:
    prompt:
      availableSkills:
        exclude: [healthcheck, node-connect, skill-creator, weather]
        # or, more conservative:
        # include: [discord]
RAW_BUFFERClick to expand / collapse

Context

Running a single-purpose trading pod on ghcr.io/openclaw/openclaw:2026.4.9. The base-image system prompt is ~35k chars of static preamble injected on every cold-start invocation. On a concrete measurement (captured via cllama's /internal/context/<agent>/snapshot), four sections contribute chars that our agents never act on:

sectionoffset in systemchars
## OpenClaw CLI Quick Reference3,922357
## Reply Tags8,685570
## Messaging (inline-components / forms / modals sub-block)9,2551,191
<available_skills>5,1422,301
subtotal~4,419 chars

Why they're moot for us:

  • CLI Quick Reference — our claws don't restart their own gateway or stop/start their own channels, so openclaw start/stop/status/etc. is irrelevant.
  • Reply Tags — we use the native message + tool-call path, no <think>/<final> streaming.
  • Messaging inline-components / forms / modals — we only send plain Discord text; no buttons, no forms, no modals.
  • <available_skills> — lists the generic base-image skills (discord, healthcheck, node-connect, skill-creator, weather) alongside operator-mounted ones. In a Discord-only trading pod, only discord is load-bearing; the other four are never called.

What works today

openclaw config schema already surfaces exactly one per-section gate of the type I'm asking for: agents.defaults.heartbeat.includeSystemPromptSection: false. Setting it in a Clawfile's CONFIGURE directive cleanly drops the ## Heartbeats block (measured -543 chars). That pattern works beautifully — the ask is to add three more siblings for the blocks above.

agents.defaults.systemPromptOverride exists as a full-string replacement, but drafting a safe override that keeps the structural pieces (## Tooling, ## Tool Call Style, ## Safety, ## Skills (mandatory), workspace-files injection, <!-- OPENCLAW_CACHE_BOUNDARY -->) while dropping only A6/A13/A14 is a much larger commitment than the per-section gate it parallels — and leaves the operator owning drift against every future openclaw release.

Proposed

1. Per-section booleans, default-true so existing pods are unaffected

agents:
  defaults:
    prompt:
      includeCLIQuickReference: false     # "## OpenClaw CLI Quick Reference"
      includeReplyTags: false             # "## Reply Tags"
      includeMessagingComponents: false   # inline-components sub-block of "## Messaging"

Each independently verifiable via /internal/context/<agent>/snapshot char-diffs. Mirrors the existing heartbeat.includeSystemPromptSection shape exactly.

2. <available_skills> filter

agents:
  defaults:
    prompt:
      availableSkills:
        exclude: [healthcheck, node-connect, skill-creator, weather]
        # or, more conservative:
        # include: [discord]

Subtractive by default (safest against future skill additions); allowlist form is a reasonable alternative for locked-down pods.

3. systemPromptOverride cookbook

Separate smaller ask: somewhere in the docs, a short reference listing which base-image sub-blocks are structural (tool-call protocol, safety framing, workspace-files injection, cache boundary) vs optional (A6/A9/A13/A14/A16/available_skills/heartbeat). Today, adopting systemPromptOverride requires reverse-engineering the rendering order from the binary to know what can be dropped without breaking managed tools or the prompt-cache boundary. A short "required building blocks vs safely-droppable" table would let single-purpose pods adopt the override without betting the pod on getting it right.

Why it's worth it

On our pod: measured best-case saving from points 1 + 2 combined is ~4,419 chars per cold-start invocation per agent. With 8 claws × dozens of cron firings per day, it compounds — every cold turn is a prompt-cache miss plus model-input cost. Gated opt-ins mean no existing pod needs to care.

Happy to send a PR if the shape looks right.

extent analysis

TL;DR

Add per-section booleans to the agents.defaults.prompt configuration to exclude unnecessary sections from the system prompt.

Guidance

  • Introduce three new booleans to the agents.defaults.prompt configuration: includeCLIQuickReference, includeReplyTags, and includeMessagingComponents, defaulting to true to maintain backwards compatibility.
  • Add an availableSkills filter to the agents.defaults.prompt configuration, allowing operators to exclude or include specific skills.
  • Consider adding a cookbook or documentation for the systemPromptOverride configuration, outlining the required and optional sub-blocks to simplify adoption.
  • Verify the changes by checking the character count of the system prompt using the /internal/context/<agent>/snapshot endpoint.

Example

agents:
  defaults:
    prompt:
      includeCLIQuickReference: false
      includeReplyTags: false
      includeMessagingComponents: false
      availableSkills:
        exclude: [healthcheck, node-connect, skill-creator, weather]

Notes

The proposed solution aims to reduce the system prompt size by excluding unnecessary sections, which can lead to significant savings in cold-start invocations. However, the effectiveness of this solution may vary depending on the specific use case and configuration.

Recommendation

Apply the proposed workaround by introducing the per-section booleans and available skills filter to the agents.defaults.prompt configuration. This approach allows for a more targeted and flexible solution, reducing the risk of breaking existing functionality.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Per-section gates for moot L1 prompt blocks (A6/A13/A14) + available_skills filter [1 participants]