OpenClaw Main Stops Admin Actions From Leaking Into Model Context and Compaction
Session sharing changes, suggestion resolutions, and display-only UI activity used to reach the model as user messages or consume context budget. A merged fix routes administrative events through structured state and honors excludeFromContext everywhere.
A merged fix closes a subtle but consequential leak inside OpenClaw sessions: administrative actions were becoming model input.
What was happening
Two related problems shared one root. First, session sharing changes (visibility, membership) and suggestion-resolution actions were appended to the conversation transcript as visible custom messages; the agent harness converted those notes into model-facing user messages. Access-control narration — who can now see this session, which suggestion got dismissed — could therefore influence later answers and get embedded in compaction summaries.
Second, display-only custom UI activity remained in session-context arrays and several compaction estimators even when it set excludeFromContext. The measured impact in the merge record is striking: excluded activity consumed 20,001 branch-summary tokens and 405,029 preemptive-pressure tokens in regression reproductions — real context budget spent on content the model was never supposed to reason about.
What changed
Sharing visibility, membership, and suggestion resolution are now owned by canonical session/SQLite state plus structured Gateway events; their transcript-note producer and rollback paths are removed. The shared session projection and compaction consumers honor excludeFromContext before replay, budgeting, continuation selection, and real-conversation classification.
Deliberately kept: agent-requested model auto-revert outcomes and failed-image hydration notes still enter future model context, because those genuinely inform subsequent turns.
Operator guidance
- If you observed agents commenting on permission changes or “knowing” about UI actions nobody typed, that behavior source is gone on current main; expect cleaner answers after your next main-based update.
- Compaction behavior changes for sessions heavy on Control UI activity: budgets previously eaten by excluded display activity return to real history. Long-running sessions may compact noticeably less often.
- The removed producers existed only in prerelease tags with no stable contract, so no transcript migration is provided — don’t build anything on transcript system-notes for admin events.
THE RECEIPTS
Claims should survive the click.
Primary links used for this article are listed openly. If the evidence changes, the verification date changes with it.THE OPERATOR BRIEF