Interactive Simulator

OpenClaw Bootstrap Truncation Simulator

See exactly what survives when OpenClaw truncates your AGENTS.md for subagent context injection. Compare naive head/tail vs the new policy-preserving digest algorithm. Based on OpenClaw PRs #82921, #84180 & #84392 merged May 19–20, 2026.

Why Use the Bootstrap Truncation Simulator

Oversized AGENTS.md files silently lose policy rules during subagent bootstrapping — preview the damage before it happens.

Live Truncation Preview

Paste your AGENTS.md content, set a character budget, and instantly see how OpenClaw truncates it. Compare old naive head/tail vs the new policy-preserving digest algorithm from PR #82921.

Policy Preservation Check

See which policy headings and high-priority instructions survive truncation. The new algorithm preserves critical AGENTS directives that naive truncation would silently drop.

Side-by-Side Comparison

Toggle between old (generic head/tail) and new (AGENTS-aware digest) strategies. See exactly what content gets preserved, summarized, or lost in each approach.

Adjustable Budget Allocation

Fine-tune head (45%), digest (35%), and tail (15%) budget percentages. Experiment with allocations to find the optimal balance for your specific AGENTS.md structure.

Coverage Statistics

Get detailed stats: original vs truncated character counts, policy headings preserved, instruction lines retained, and percentage of content surviving each strategy.

Browser-Only Processing

Nothing leaves your machine. All truncation simulation runs client-side in your browser — no server calls, no telemetry, no data stored anywhere.

Simulate Truncation

Paste your AGENTS.md below, adjust the budget, and see what survives each truncation strategy.

AGENTS.md Content

chars
500Aggressive truncation12,000

Runs entirely in your browser — nothing is sent to any server.

Frequently Asked Questions

What is bootstrap truncation in OpenClaw?

When OpenClaw injects context files (like AGENTS.md) into the bootstrap prompt for subagents, oversized files must be truncated to fit within the context budget. Before PR #82921, all files used a generic head/tail approach — keep the first and last portions, discard the middle. This caused critical policy rules in the middle of AGENTS.md files to be silently omitted from subagent context.

How does the new AGENTS-aware truncation work?

PR #82921 introduced a specialized truncation strategy for AGENTS.md files: the head (45% of budget) retains opening context, a digest section (35%) extracts markdown headings and high-priority instruction lines from the middle, and the tail (15%) preserves closing content. Non-AGENTS.md files continue using generic truncation. This ensures scoped policy instructions aren't lost during context injection.

What is the default character budget for AGENTS.md?

AGENTS.md files exceeding 12,000 characters trigger the truncation logic in buildBootstrapContextFiles. The budget is determined by the overall bootstrap context allocation, which varies by model context window size. Files under the threshold are injected in full without any truncation.

How do PRs #84180 and #84392 relate to bootstrap policy preservation?

PR #84180 fixes a bug where configured Claude image capabilities were lost during agent runtime configuration. PR #84392 fixes node approval scope requests that failed after a gate update. Together with #82921, these PRs represent a pattern of ensuring critical agent configuration — policies, capabilities, and scopes — survives context processing and truncation rather than being silently dropped.

What counts as a high-priority instruction line?

The digest extractor prioritizes lines containing markdown headings (##, ###), lines with strong emphasis (**bold**), lines starting with MUST, NEVER, ALWAYS, REQUIRED, or IMPORTANT (case-insensitive), and lines containing policy-related keywords like 'approve', 'deny', 'scope', 'permission', and 'security'. These heuristics aim to capture the most critical policy directives.

Is my AGENTS.md content sent anywhere?

No. This tool runs 100% client-side in your browser using JavaScript. No network requests are made, no data is stored in cookies or localStorage, and nothing is logged. You can verify by opening your browser's Network tab while using the simulator.

Let DeployClaw Manage Your Agent Context

DeployClaw automatically optimizes bootstrap context injection, monitors truncation impact, and preserves critical policies across all your OpenClaw agents.