openclaw - 💡(How to fix) Fix Prompt Request: agents.list[].bootstrapMaxChars silently ignored at agent level

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…

Fix Action

Fix / Workaround

Workaround Set agents.defaults.bootstrapMaxChars. Works, but applies to all agents instead of just the one that needs a larger budget.

Code Example

export type AgentConfig = {
  ...
  bootstrapMaxChars?: AgentDefaultsConfig["bootstrapMaxChars"];
  bootstrapTotalMaxChars?: AgentDefaultsConfig["bootstrapTotalMaxChars"];
};

---

workspace bootstrap file AGENTS.md is 20496 chars (limit 12000); truncating in injected context (sessionKey=agent:flood-claw:main)
RAW_BUFFERClick to expand / collapse

Prompt Request: agents.list[].bootstrapMaxChars is silently ignored; type definition and runtime disagree

Environment

  • OC: 2026.5.16-beta.4 (commit 38c3a8d)
  • Build path: ~/.npm-global/lib/node_modules/openclaw

Type definition says it's a valid per-agent override: dist/plugin-sdk/src/config/types.agents.d.ts:

export type AgentConfig = {
  ...
  bootstrapMaxChars?: AgentDefaultsConfig["bootstrapMaxChars"];
  bootstrapTotalMaxChars?: AgentDefaultsConfig["bootstrapTotalMaxChars"];
};

Reproduction

  1. In openclaw.json, add bootstrapMaxChars: 25000 to an entry in agents.list[] (NOT to agents.defaults).
  2. Restart openclaw-gateway.
  3. Trigger a session for that agent whose workspace AGENTS.md is > 12,000 chars.

Observed Log still emits truncation warning with the default limit (12,000), as if the per-agent value were never read:

workspace bootstrap file AGENTS.md is 20496 chars (limit 12000); truncating in injected context (sessionKey=agent:flood-claw:main)

Expected Either: (a) the per-agent value applies (consistent with the type definition above and with agent-scope-config-az8h5-D_.js:66 which does read entry.bootstrapMaxChars), OR (b) the config loader warns/rejects at boot when bootstrapMaxChars appears on agents.list[], so users aren't left thinking they've set it.

Files of interest

  • dist/pi-embedded-helpers-iYKBJkuj.jsresolveBootstrapMaxChars(cfg, agentId); reads resolveAgentConfig(cfg, agentId)?.bootstrapMaxChars then falls back to defaults. Suggests resolveAgentConfig may be stripping the field before this lookup runs.
  • dist/bootstrap-budget-BVWgM60l.js:149 — the user-facing warning text already only mentions agents.defaults.bootstrapMaxChars, which is what works today.

Acceptance criteria

  • Either per-agent bootstrapMaxChars is honored end-to-end, with a test that asserts it overrides defaults
  • OR the type definition removes the per-agent field, AND the config loader emits a warning when it's set there
  • Resolution path documented in the workspace-bootstrap reference page

Workaround Set agents.defaults.bootstrapMaxChars. Works, but applies to all agents instead of just the one that needs a larger budget.

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 Prompt Request: agents.list[].bootstrapMaxChars silently ignored at agent level