dsh-background-compaction

Replaces the built-in compaction provider: at a configurable fraction of the context threshold (85% by default) a detached task summarizes everything up to the previous turn, and the next step boundary commits that held summary as a checkpoint with zero model calls, so the swap itself takes milliseconds. /bcompact [message] starts the same generation on demand and then sends the message. A settings page sets the trigger ratio, the summarization model, and how many consecutive failures stop background generation until a half-open probe gets through. Subagent sessions, a changed prefix or an expired summary fall back to the built-in synchronous path.

Overview

Replaces the built-in compaction provider: at a configurable fraction of the context threshold (85% by default) a detached task summarizes everything up to the previous turn, and the next step boundary commits that held summary as a checkpoint with zero model calls, so the swap itself takes milliseconds. /bcompact [message] starts the same generation on demand and then sends the message. A settings page sets the trigger ratio, the summarization model, and how many consecutive failures stop background generation until a half-open probe gets through. Subagent sessions, a changed prefix or an expired summary fall back to the built-in synchronous path.

Installation

Install from npm

dsh plugin --profile web add dsh-background-compaction

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:OZONGO/dsh-background-compaction

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands