Description
When a workspace bootstrap file (e.g. MEMORY.md) exceeds the bootstrapMaxChars limit (default 20,000 chars), the gateway truncates it silently and the agent stops replying entirely in the TUI. No error is shown to the user — the session just hangs at idle with no response.
Steps to Reproduce
- Have a workspace with a bootstrap file (e.g.
MEMORY.md) larger than 20,000 chars
- Send a message to the agent in the TUI
- Agent shows
connected | idle but never replies
Expected Behavior
- Agent should still reply (with truncated context, or a warning)
- OR the TUI should show a visible warning that the bootstrap file was truncated and context is incomplete
- The truncation should NOT silently cause the agent to stop responding
Actual Behavior
Agent silently fails to reply. Gateway log shows:
[agent/embedded] workspace bootstrap file MEMORY.md is 40470 chars (limit 20000); truncating in injected context
[agent/embedded] Removed orphaned user message to prevent consecutive user turns.
The "orphaned user message" removal appears to be a downstream consequence of the truncation corrupting the message sequence — the user turn gets stripped and the agent never processes the message.
Environment
- OpenClaw version: 2026.3.9
- Platform: macOS
- Bootstrap file size: ~40KB (MEMORY.md)
bootstrapMaxChars default: 20,000
Notes
The bootstrapMaxChars config option exists and works, but users shouldn't need to know this internal limit exists. The silent failure with no feedback is the core issue. A warning in the TUI or a fallback reply would prevent confusion.
Description
When a workspace bootstrap file (e.g.
MEMORY.md) exceeds thebootstrapMaxCharslimit (default 20,000 chars), the gateway truncates it silently and the agent stops replying entirely in the TUI. No error is shown to the user — the session just hangs atidlewith no response.Steps to Reproduce
MEMORY.md) larger than 20,000 charsconnected | idlebut never repliesExpected Behavior
Actual Behavior
Agent silently fails to reply. Gateway log shows:
The "orphaned user message" removal appears to be a downstream consequence of the truncation corrupting the message sequence — the user turn gets stripped and the agent never processes the message.
Environment
bootstrapMaxCharsdefault: 20,000Notes
The
bootstrapMaxCharsconfig option exists and works, but users shouldn't need to know this internal limit exists. The silent failure with no feedback is the core issue. A warning in the TUI or a fallback reply would prevent confusion.