Skip to content

Agent silently fails to reply when workspace bootstrap file exceeds bootstrapMaxChars limit #42084

@fwends

Description

@fwends

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

  1. Have a workspace with a bootstrap file (e.g. MEMORY.md) larger than 20,000 chars
  2. Send a message to the agent in the TUI
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions