openclaw - ✅(Solved) Fix [Bug]: `agents.defaults.skipBootstrap: true` is a no-op for workspace bootstrap files [1 pull requests, 1 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#75184Fetched 2026-05-01 05:37:13
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
2
Author
Timeline (top)
cross-referenced ×2labeled ×2commented ×1referenced ×1

Setting agents.defaults.skipBootstrap: true in openclaw.json does not skip workspace bootstrap file injection; the systemPromptReport for subsequent agent runs still reports all bootstrap files (AGENTS.md, SOUL.md, TOOLS.md, etc.) injected with their full per-file content, identical to runs with the flag unset.

Root Cause

Setting agents.defaults.skipBootstrap: true in openclaw.json does not skip workspace bootstrap file injection; the systemPromptReport for subsequent agent runs still reports all bootstrap files (AGENTS.md, SOUL.md, TOOLS.md, etc.) injected with their full per-file content, identical to runs with the flag unset.

Fix Action

Fix / Workaround

Severity: low–medium. Functional workaround exists (lower bootstrapMaxChars instead, optionally to a very small value like 1 to effectively skip), but the misleading flag erodes trust in the config surface.

PR fix notes

PR #75217: fix(agents): honor skipBootstrap at runtime injection path (#75184)

Description (problem / solution / changelog)

Summary

  • Problem: agents.defaults.skipBootstrap: true was advertised as a way to skip workspace bootstrap content, but it was a no-op for the runtime system-prompt injection. systemPromptReport still showed AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, BOOTSTRAP.md injected with their full per-file content.
  • Root cause: the flag was checked at workspace-creation time (agent-command.ts:375 -> ensureBootstrapFiles: !agentCfg?.skipBootstrap) but the runtime injection path resolveBootstrapFilesForRun (and resolveBootstrapContextForRun which wraps it) loaded the workspace bootstrap files unconditionally. So files created during a previous bootstrap kept being injected even after the operator set the flag.
  • What changed: added an early return in resolveBootstrapFilesForRun when config.agents.defaults.skipBootstrap === true. Empty bootstrap files → empty contextFiles → no injection. Workspace-creation behavior unchanged.

Linked Issue

  • Closes #75184
  • Bug fix

Test Plan

  • pnpm tsgo:core clean
  • pnpm exec oxfmt --check clean

Changed files

  • docs/gateway/config-agents.md (modified, +6/-1)
  • src/agents/bootstrap-files.test.ts (modified, +38/-0)
  • src/agents/bootstrap-files.ts (modified, +7/-0)
  • src/config/types.agent-defaults.ts (modified, +8/-1)

Code Example

openclaw config set agents.defaults.skipBootstrap true
   openclaw config validate

---

openclaw agent --session-id repro-skip -m "Reply with the single word: ready" --json

---

"skipBootstrap": { "type": "boolean" }

---

Excerpt from `result.meta.systemPromptReport` of an `openclaw agent --json` run with `agents.defaults.skipBootstrap=true`:


{
  "systemPrompt": {
    "chars": 27345,
    "projectContextChars": 13465,
    "nonProjectContextChars": 13880
  },
  "injectedWorkspaceFiles": [
    {"name": "AGENTS.md",   "rawChars": 7809, "injectedChars": 7809, "truncated": false},
    {"name": "SOUL.md",     "rawChars": 1738, "injectedChars": 1738, "truncated": false},
    {"name": "TOOLS.md",    "rawChars":  850, "injectedChars":  850, "truncated": false},
    {"name": "IDENTITY.md", "rawChars":  633, "injectedChars":  633, "truncated": false},
    {"name": "USER.md",     "rawChars":  474, "injectedChars":  474, "truncated": false},
    {"name": "HEARTBEAT.md","rawChars":  192, "injectedChars":  192, "truncated": false},
    {"name": "BOOTSTRAP.md","rawChars": 1450, "injectedChars": 1450, "truncated": false}
  ]
}


Setting `agents.defaults.bootstrapMaxChars: 200` on the same gateway (with `skipBootstrap` still `true`) produced the expected truncation behavior — `injectedChars` dropped to ~280 per file, `systemPrompt.chars` dropped to 16,098 — confirming that the per-file truncation knob works while `skipBootstrap` does not.

Schema lookup:

$ openclaw config schema | jq '.properties.agents.properties.defaults.properties.skipBootstrap'
{
  "type": "boolean"
}

No `title`, no `description`. Compare to the documented `bootstrapMaxChars` entry below it which has both.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Setting agents.defaults.skipBootstrap: true in openclaw.json does not skip workspace bootstrap file injection; the systemPromptReport for subsequent agent runs still reports all bootstrap files (AGENTS.md, SOUL.md, TOOLS.md, etc.) injected with their full per-file content, identical to runs with the flag unset.

Steps to reproduce

  1. Install OpenClaw 2026.4.9 standalone (npm install -g [email protected]) on a host with a fresh ~/.openclaw/.
  2. Run openclaw doctor --fix to bootstrap default config + auto-generate the workspace files. This produces ~/.openclaw/workspace/{AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, BOOTSTRAP.md} totaling ~13 KB raw.
  3. Set the flag and validate:
    openclaw config set agents.defaults.skipBootstrap true
    openclaw config validate
  4. Restart the gateway: systemctl --user restart openclaw-gateway.service.
  5. Run an agent turn with --json:
    openclaw agent --session-id repro-skip -m "Reply with the single word: ready" --json
  6. Inspect result.meta.systemPromptReport.injectedWorkspaceFiles and result.meta.systemPromptReport.systemPrompt.chars in the response.

Expected behavior

With skipBootstrap: true, either:

  • (a) injectedWorkspaceFiles should be empty (or only include files explicitly opted into), and systemPrompt.chars should drop by the per-file char total, OR
  • (b) The schema should document that this flag affects a different code path (e.g. plugin bootstrap, not workspace bootstrap), and the field name should reflect that scope.

The current schema entry is:

"skipBootstrap": { "type": "boolean" }

— no title, no description, no scope hint.

Actual behavior

injectedWorkspaceFiles returned for the agent run still contains all 7 files with truncated: false and injectedChars equal to rawChars. systemPrompt.chars is unchanged from runs with the flag unset (27,345 chars in our environment, matching the sum of OpenClaw framework prompt + all 7 workspace files at full size). The flag has no observable effect on workspace-bootstrap injection.

OpenClaw version

2026.4.9 (build 0512059)

Operating system

Ubuntu 24.04 LTS aarch64 (Linux 6.17.0-1014-nvidia)

Install method

npm global (npm install -g [email protected]), Node v22.22.2 via nvm

Model

NousResearch/Hermes-3-Llama-3.1-8B (model is irrelevant — the bug is in the prompt-construction layer, before the model is invoked)

Provider / routing chain

openclaw (standalone host gateway) → vLLM (http://127.0.0.1:8002/v1) → Hermes-3-Llama-3.1-8B

Additional provider/model setup details

Standalone OpenClaw on a host (no NemoClaw sandbox). vLLM 0.19.1 Docker container at :8002 with --enable-auto-tool-choice --tool-call-parser hermes --gpu-memory-utilization 0.20 --max-model-len 32768, no --api-key. ~/.openclaw/openclaw.json gateway.mode=local, controlUi.allowInsecureAuth=true, dangerouslyDisableDeviceAuth=true.

Logs, screenshots, and evidence

Excerpt from `result.meta.systemPromptReport` of an `openclaw agent --json` run with `agents.defaults.skipBootstrap=true`:


{
  "systemPrompt": {
    "chars": 27345,
    "projectContextChars": 13465,
    "nonProjectContextChars": 13880
  },
  "injectedWorkspaceFiles": [
    {"name": "AGENTS.md",   "rawChars": 7809, "injectedChars": 7809, "truncated": false},
    {"name": "SOUL.md",     "rawChars": 1738, "injectedChars": 1738, "truncated": false},
    {"name": "TOOLS.md",    "rawChars":  850, "injectedChars":  850, "truncated": false},
    {"name": "IDENTITY.md", "rawChars":  633, "injectedChars":  633, "truncated": false},
    {"name": "USER.md",     "rawChars":  474, "injectedChars":  474, "truncated": false},
    {"name": "HEARTBEAT.md","rawChars":  192, "injectedChars":  192, "truncated": false},
    {"name": "BOOTSTRAP.md","rawChars": 1450, "injectedChars": 1450, "truncated": false}
  ]
}


Setting `agents.defaults.bootstrapMaxChars: 200` on the same gateway (with `skipBootstrap` still `true`) produced the expected truncation behavior — `injectedChars` dropped to ~280 per file, `systemPrompt.chars` dropped to 16,098 — confirming that the per-file truncation knob works while `skipBootstrap` does not.

Schema lookup:

$ openclaw config schema | jq '.properties.agents.properties.defaults.properties.skipBootstrap'
{
  "type": "boolean"
}

No `title`, no `description`. Compare to the documented `bootstrapMaxChars` entry below it which has both.

Impact and severity

Affected: any user who reaches for agents.defaults.skipBootstrap to control prompt size — particularly relevant when running small/mid local models that degrade with long system prompts (per AGENTIF / Berkeley research showing prompts >2K words deprioritize tool-use instruction). The user wastes time tuning a flag that does nothing, and may default to assuming the prompt is already minimal when it isn't.

Severity: low–medium. Functional workaround exists (lower bootstrapMaxChars instead, optionally to a very small value like 1 to effectively skip), but the misleading flag erodes trust in the config surface.

Frequency: deterministic (always; it's a flag-handling bug, not a race).

Consequence: tool-use reliability degradation on small models gets misdiagnosed as a model issue when it's actually a prompt-construction issue, and the documented-looking knob to fix it doesn't work.

Additional information

Related:

  • #43767 (closed COMPLETED 2026-04-24) "Heartbeat ignores lightContext: true" — same class of bug (a documented-looking bootstrap-skip flag silently ignored). Fix shipped for the heartbeat path: heartbeat runs now forward bootstrapContextMode: lightweight + bootstrapContextRunKind: heartbeat and the bootstrap filter keeps only HEARTBEAT.md when both are set (src/agents/bootstrap-files.ts:165 per the closing comment). That fix is heartbeat-specific; there is no analogous wiring for normal agent runs, leaving agents.defaults.skipBootstrap as the only documented-looking knob for non-heartbeat skip — which this issue reports does not work.
  • agents.defaults.heartbeat.lightContext is the heartbeat-scoped equivalent (now functional after #43767 shipped). This issue is asking for either equivalent functionality on the normal-agent-run code path, or honest deletion/renaming of agents.defaults.skipBootstrap.
  • Closed PR conversation on #62182 ("bootstrapMaxCharsPerFile rejected") confirmed agents.defaults.bootstrapMaxChars and bootstrapTotalMaxChars are the supported knobs. skipBootstrap was not mentioned in that thread, suggesting it predates and was never aligned with the rest of the bootstrap config surface.
  • Open #22438 ("Tiered bootstrap file loading") and its candidate PR #22439 would supersede skipBootstrap with a bootstrapTier: minimal | standard | full config — if skipBootstrap is genuinely vestigial, that issue's resolution is the right place to remove or replace it.

Suggested fixes (any one resolves):

  1. Make skipBootstrap: true actually skip workspace-file injection (set injectedWorkspaceFiles = [] in the prompt builder).
  2. Remove the flag, scoping users to bootstrapMaxChars: 0 (or whatever value disables) as the supported path.
  3. Document the flag's actual scope in the schema entry, then rename to match (e.g. skipPluginBootstrap).

extent analysis

TL;DR

The agents.defaults.skipBootstrap flag does not skip workspace bootstrap file injection as expected, and a workaround is to set bootstrapMaxChars to a low value to effectively skip injection.

Guidance

  • Verify the issue by checking the injectedWorkspaceFiles and systemPrompt.chars in the response of an openclaw agent --json run with agents.defaults.skipBootstrap set to true.
  • Use the bootstrapMaxChars flag as a workaround to control the injection of workspace files, setting it to a low value (e.g., 0 or 1) to effectively skip injection.
  • Check the OpenClaw schema and documentation for any updates or clarifications on the skipBootstrap flag.
  • Consider removing or renaming the skipBootstrap flag to avoid confusion, as suggested in the issue.

Example

No code snippet is provided as the issue is related to configuration and flag handling.

Notes

The issue is specific to the OpenClaw version 2026.4.9 and may be resolved in future updates. The bootstrapMaxChars flag is a supported workaround, but the skipBootstrap flag's behavior is unclear and may be removed or renamed in the future.

Recommendation

Apply the workaround by setting bootstrapMaxChars to a low value, as this is a supported configuration option. The skipBootstrap flag's behavior is unclear, and using bootstrapMaxChars provides a more reliable way to control workspace file injection.

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…

FAQ

Expected behavior

With skipBootstrap: true, either:

  • (a) injectedWorkspaceFiles should be empty (or only include files explicitly opted into), and systemPrompt.chars should drop by the per-file char total, OR
  • (b) The schema should document that this flag affects a different code path (e.g. plugin bootstrap, not workspace bootstrap), and the field name should reflect that scope.

The current schema entry is:

"skipBootstrap": { "type": "boolean" }

— no title, no description, no scope hint.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING