Compaction UI Enhancements
ReviewAudited by ClawScan on May 10, 2026.
Overview
The skill matches its compaction purpose, but it can automatically rewrite persistent session context using existing model credentials, so it warrants review before installation.
Install only if you want automatic session compaction. Review the settings immediately, disable auto-compaction if you want manual control, keep result storage off unless needed, confirm which model/provider credentials will be used, and back up important sessions before enabling automatic rewriting.
Findings (6)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
A conversation may be summarized and compacted in the background, which can remove detail from the active session context and affect future responses.
This shows the UI can invoke the session-compaction RPC automatically after chat responses when token use crosses a threshold, rather than only after a direct user click.
Called after every chat "final" event... if (pct < settings.settings.autoThresholdPercent) return; ... app.client?.request("sessions.compact", { key: app.sessionKey });Make automatic compaction clearly opt-in, show an explicit first-run warning, and provide backup or rollback guidance for compacted sessions.
Compaction could interrupt an active agent run or leave future work depending on the compacted summary instead of the original full transcript.
The compact RPC can abort an active run and update persistent session metadata, so one compaction action can affect in-flight work and later session behavior.
if (isEmbeddedPiRunActive(sessionId)) { abortRun(sessionId); await waitEnd(sessionId, 15_000); } ... entryToUpdate.totalTokens = result.result.tokensAfter; ... entryToUpdate.compactionCount = ...Avoid aborting active runs automatically, require confirmation when a run is active, and keep recoverable backups of session transcripts.
Background compaction may use the same provider account, OAuth profile, API key, billing, and data-sharing path as normal chat.
The skill reuses existing chat credentials for compaction model calls, which is expected for this feature but should be understood by the user.
Compaction uses `resolveApiKeyForProvider` via `getApiKeyForModel` — the same auth chain as chat: OAuth → API Key → Fallback ... compaction uses it automatically.
Confirm which provider/model will be used for compaction and disable auto-compaction if you do not want background model calls.
Compaction summaries or metadata may remain on disk and may influence what context is preserved for future work.
The skill persists last-result metadata, and optionally the compacted summary text, under the agent directory.
if (config.settings.storeLastResult) { config.lastResult = result; } else { config.lastResult = { ...result, summary: undefined }; } await saveCompactionConfig(config, agentDir);Keep result storage disabled unless needed, clear stored results when done, and treat compacted summaries as sensitive conversation data.
Some internal assistant/control messages may not be visible in the chat transcript view.
The UI intentionally hides assistant messages with these exact control-message texts from chat display.
if (fullText === "NO_REPLY" || fullText === "HEARTBEAT_OK") { continue; }Document this filtering clearly and keep it limited to exact, non-user-facing control messages.
Users have less external provenance to rely on when deciding whether to integrate these UI/gateway changes.
The artifact provenance is limited, even though no external install script or dependency is shown.
Source: unknown; Homepage: none
Review the provided diffs before applying them and prefer a repository or signed release for production use.
