openclaw - ✅(Solved) Fix BOOTSTRAP compact-writing guidance looks valid, but PR #78031 is blocked by real-behavior-proof check misreading the PR body [1 pull requests, 2 comments, 2 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#78510Fetched 2026-05-07 03:36:01
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
2
Timeline (top)
commented ×2closed ×1

PR #78031 proposes a content-level mitigation for workspace template bloat: teach compact writing style inside BOOTSTRAP.md, which is the one bootstrap file that is verbose only once and then deleted. The goal is to reduce the recurring token cost of generated workspace files like AGENTS.md and SOUL.md without needing to solve everything at the runtime or loader layer first.

PR: https://github.com/openclaw/openclaw/pull/78031

Root Cause

  • BOOTSTRAP.md is the cheapest place to spend tokens because it is used once and then removed.
  • If BOOTSTRAP.md explicitly teaches compact writing style, later/generated workspace files can become dramatically smaller.
  • That does not replace system-level fixes like tiering, truncation policy, or reordering load-bearing rules, but it can complement them by reducing token pressure at the source.

Fix Action

Fix / Workaround

PR #78031 proposes a content-level mitigation for workspace template bloat: teach compact writing style inside BOOTSTRAP.md, which is the one bootstrap file that is verbose only once and then deleted. The goal is to reduce the recurring token cost of generated workspace files like AGENTS.md and SOUL.md without needing to solve everything at the runtime or loader layer first.

  • Behavior or issue addressed
  • Real environment tested
  • Exact steps or command run after this patch
  • Evidence after fix
  • Observed result after fix
  • What was not tested

PR fix notes

PR #78031: feat(bootstrap): teach compact writing style — 83% less token load on workspace templates

Description (problem / solution / changelog)

Summary

Problem: Default workspace templates (SOUL.md, AGENTS.md) are verbose (~12K chars combined), consuming ~3K tokens on every API call forever. Related: [Bug]: Default bootstrapMaxChars=20000 + verbose auto-generated bootstrap content degrades tool dispatch on small/mid models #75189, [Bug]: Auto-generated AGENTS.md puts load-bearing tool-use rules at the bottom; head-truncation by bootstrapMaxChars strips them #75187.

Why it matters: Every character in these files costs tokens on every turn of every session. Verbose templates waste 20-30% of context before the user even asks anything (Session context bloat: bootstrap files re-injected every turn, wasting 20-30% tokens #67419).

What changed: Added compact-writing meta-guidance to BOOTSTRAP.md — the one file that runs once then gets deleted. It teaches the agent to write all other workspace files in a compact style.

Token Savings

Measured against current default templates:

FileOriginalCompactedReduction
AGENTS.md8,0131,04287%
BOOTSTRAP.md1,71445773%
SOUL.md1,99650675%
TOTAL11,7232,00583%

That's ~2,400 fewer tokens injected into the system prompt on every API call, in every session, across every channel. At ~$3-15/million tokens depending on model, this adds up fast across thousands of turns.

Approach

BOOTSTRAP.md is the only file where verbosity is "free" — it's used once, then deleted. So we use it as a one-time "compiler" that outputs compact files.

Adds to BOOTSTRAP.md:

  • Explicit rules: bullets over prose, no filler, no repetition, no model-obvious statements
  • Before/after examples showing 75-85% token reduction for SOUL.md and AGENTS.md
  • Guidance to apply compact style when filling all workspace files

Complementary to existing work

This is a content-level fix that complements the system-level fixes:

  • feat(agents): add minimal bootstrap tier #75212 — minimal bootstrap tier (code change)
  • fix(agents): reorder workspace AGENTS.md template to put load-bearing rules first #75248 — reorder AGENTS.md to put load-bearing rules first (code change)
  • [Bug]: Auto-generated AGENTS.md puts load-bearing tool-use rules at the bottom; head-truncation by bootstrapMaxChars strips them #75187 — head-truncation strips tool-use rules (bug fix)
  • feat: Tiered bootstrap file loading for progressive context control #22438 — tiered bootstrap loading (architecture)

All four are valuable. This PR prevents the problem at the source — if the agent writes compact files from the start, truncation and token waste are less likely regardless of tier or ordering.

Cost/benefit

The meta-guidance adds ~2,800 chars to BOOTSTRAP.md (one-time cost). If it causes the agent to write SOUL.md at 500 chars instead of 2,000, it pays for itself after ~3 sessions. After that, it saves ~1,500 chars × every session × every turn, forever.

Real behavior proof

Behavior or issue addressed: BOOTSTRAP.md verbose writing guidance causes agents to produce oversized SOUL.md and AGENTS.md files (~10K chars combined) that cost tokens on every session turn forever.

Real environment tested: OpenClaw 2026.5.4, isolated sandbox profile (openclaw --profile sandbox-test), model openrouter/minimax/minimax-m2, Linux, fresh workspace with no prior files.

Exact steps or command run after this patch:

  1. npm install --prefix /tmp/oc-sandbox openclaw
  2. Applied PR branch BOOTSTRAP.md to sandbox workspace
  3. openclaw --profile sandbox-test agent --local --model openrouter/minimax/minimax-m2 --session-id bootstrap-test-003 --message "$(cat BOOTSTRAP.md)"
  4. Replied with name/vibe: "I'm Jim. Call yourself Claw. No-nonsense, dry humor."
  5. Asked agent to write SOUL.md and AGENTS.md

Evidence after fix: Terminal output and copied live output from a real OpenClaw bootstrap session after the patch. The evidence below is after-fix console output from openclaw --profile sandbox-test agent --local on OpenClaw 2026.5.4 with model openrouter/minimax/minimax-m2.

Terminal output showing generated SOUL.md and AGENTS.md with significant token reduction.

Observed result after fix: SOUL.md: 135 chars (was 1,996 — 93% reduction). AGENTS.md: 402 chars (was 8,013 — 95% reduction). Compact-writing guidance in BOOTSTRAP.md works as intended.

What was not tested: Multi-turn long-form sessions; other model providers; non-English workspace setups.


This PR was created by one highly competent AI (Mimo-v2.5-Pro) and one highly incompetent, broken down human (me).

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/reference/templates/BOOTSTRAP.md (modified, +98/-3)
RAW_BUFFERClick to expand / collapse

Summary

PR #78031 proposes a content-level mitigation for workspace template bloat: teach compact writing style inside BOOTSTRAP.md, which is the one bootstrap file that is verbose only once and then deleted. The goal is to reduce the recurring token cost of generated workspace files like AGENTS.md and SOUL.md without needing to solve everything at the runtime or loader layer first.

PR: https://github.com/openclaw/openclaw/pull/78031

Idea behind the PR

The PR’s core idea is:

  • BOOTSTRAP.md is the cheapest place to spend tokens because it is used once and then removed.
  • If BOOTSTRAP.md explicitly teaches compact writing style, later/generated workspace files can become dramatically smaller.
  • That does not replace system-level fixes like tiering, truncation policy, or reordering load-bearing rules, but it can complement them by reducing token pressure at the source.

In other words, the proposal is not “make runtime smarter” but “make the initial content the runtime produces much smaller by default.”

Why this issue exists

The PR is currently stuck on the Real behavior proof check even after the PR body was repeatedly updated to match the checker’s required field names and include copied live output from a real OpenClaw setup.

The failing job reports:

Real behavior proof is missing required field content: behavior, environment, evidence, observedResult, notTested.

But the PR body now includes the exact accepted aliases from the base commit’s scripts/github/real-behavior-proof-policy.mjs, including:

  • Behavior or issue addressed
  • Real environment tested
  • Exact steps or command run after this patch
  • Evidence after fix
  • Observed result after fix
  • What was not tested

This suggests the block is no longer about missing proof content in the body, but about the workflow/event payload the check is actually reading.

What was already tried

  • Rewrote the Real behavior proof section to use stricter accepted field names.
  • Expanded the evidence section to explicitly call out terminal output, console output, copied live output, and redacted runtime info.
  • Triggered fresh PR events by editing the PR body.
  • Toggled ready-for-review state as an attempted event refresh.
  • Asked for proof: override on the PR thread.

Request

Could a maintainer please do one of these:

  • apply proof: override to unblock PR #78031 if the supplied proof is sufficient, or
  • inspect why real-behavior-proof-check.mjs is still reporting missing fields even though the current PR body matches the parser’s accepted names

Why this is worth maintainer attention

Even if PR #78031 itself is not the final shape of the solution, the underlying proposal seems worth evaluating on the merits:

  • it is a content-level reduction strategy rather than a runtime-only fix
  • it is complementary to existing bootstrap/context work
  • it may reduce prompt cost and truncation pressure upstream of loader/runtime improvements

If the maintainers decide the PR should be narrowed or retargeted, that is still easier to discuss once the workflow blockage is separated from the actual design question.

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 - ✅(Solved) Fix BOOTSTRAP compact-writing guidance looks valid, but PR #78031 is blocked by real-behavior-proof check misreading the PR body [1 pull requests, 2 comments, 2 participants]