Skip to content

Feature request: compaction mode 'off' or 'error' to hard-fail instead of summarizing #17735

Closed as not planned

Description

@karmaniverous

Problem

When a session hits the context window limit, auto-compaction summarizes older history. The summary is lossy and agents don't reliably recover context afterward, even with explicit recovery instructions in workspace files.

Request

Add a compaction mode that refuses to compact and instead returns a hard error, forcing the session to be manually reset. Something like:

{ compaction: { mode: error } }

Why

  • Compaction summaries lose nuance, decisions, and working context
  • Recovery instructions are unreliable post-compaction
  • A hard failure with clean context rebuild is preferable to a silently degraded session
  • Users who manage long sessions via /reset already have the muscle memory; they just need the signal

Current behavior

Only two modes exist: default and safeguard. Both compact. There's no way to opt out.

Environment

OpenClaw 2026.2.6-3, Windows, Slack channel

Activity

  1. curtismercier commented on Feb 17, 2026

    @curtismercier

    Hey @karmaniverous — PR #19329 adds compaction.mode: "off" as a per-agent override, which should address your core request. When set, the agent skips compaction entirely — no summarization, no token reserve enforcement, no memory flush.

    It doesn't include the "error" mode you mentioned (hard-fail on context limit), but "off" gives you full control to handle context management externally via plugins or custom logic.

    If this covers your use case, a 👍 on the PR would help get it prioritized. Happy to discuss if you'd still want an "error" mode as a follow-up.

  2. openclaw-barnacle commented on Feb 25, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  3. added
    stale
    on Feb 25, 2026
  4. openclaw-barnacle commented on Mar 14, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh repro steps.

  5. locked as resolved and limited conversation to collaborators on Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions