Preface¶
When running long sessions in DSH (DeepSeek Harness), the context window gets filled up with large chunks of logs, scraped pages, and tool outputs. The community plugin billion-context-dsh (ACP) can compress a segment of context into a summary written by the Agent itself—this is a common way to “reduce burden.” But some content is not suitable for compressing into summaries: long logs that may need to be cross-referenced with the original text later can be moved out of the window directly; dead-end retrievals or expired snapshots that are no longer valuable should be deleted entirely, neither written as summaries nor saved to disk.
billion-context-relief, published by maintainer markelayan, is categorized as a “memory” type DSH plugin and serves as a companion to ACP. It provides two explicit operations—“export to file and leave a pointer” and “delete without file”—and comes with tools for discovering large context blocks and managing exported files. The README clearly states: there is no automatic compression, export, or deletion whatsoever; the only thing that appears automatically is an advisor notification that serves solely as a hint.
What Is This¶
- npm package name:
billion-context-relief(version0.1.2in current materials, MIT license) - Positioning: On-demand context relief requested by the Agent, companion to billion-context-dsh (ACP)
- Runtime environment: Node.js
>= 20; declared compatible with DSH0.2.0-rc.2, does not support DSH0.1.x - Dependency: Does not include a compression engine; peer dependency on
billion-context-dsh, and ACP must be the currently active compaction engine in the profile (replacecompaction-basicindsh.profile.bundles)
If ACP is not installed or a different compaction engine is used, the tools in this plugin will explain that ACP is required and will not modify the context; the advisor will also remain silent.
Division of Responsibilities with ACP¶
ACP performs replacement through the compress path; each replacement by this plugin also goes through the same path, so its behavior is consistent with existing ACP blocks. The README summarizes two types of scenarios:
| Scenario | Tool | Effect |
|---|---|---|
| Large but may need the original | context_export |
Write the range to a temporary file (the model does not read the file content); replace with a single pointer line in the window |
| No longer worth keeping | context_delete |
Discard the range, no summary, no file; materials describe it as marked with DELETED REFERENCES |
Additionally: context_large_blocks is a read-only listing of oversized items outside protected zones; context_exports manages exported files by name.
Range boundaries use surface seq (integer) or ACP’s mNNNNN ref, consistent with the output of context_large_blocks and acp_status; ranges are closed intervals.
Core Tools (Verified Capabilities)¶
context_large_blocks¶
Read-only scan to help decide “which segment to act on.” Optional parameters include largeMessageTokens, largeTurnTokens, largeBlockTokens (single-overlap threshold), and limit (1–50, default 20). The output provides thresholds, seq ranges, estimated tokens, and number of turns since; it does not display body content. The description mentions: turn entries and the messages within them overlap, so you should operate on one of them, not both.
context_export¶
Writes a range of finished context to a temporary file and replaces that range with a single pointer line.
| Parameter | Description |
|---|---|
startSeq / endSeq |
Required; seq or mNNNNN |
name |
Optional, filename hint, e.g., pytest-run-3 |
note |
Optional, a one-line description kept in the pointer (materials note a maximum of 120 characters) |
context_delete / context_exports¶
- context_delete: Deletes the specified range without generating a summary file (package description: marked with DELETED REFERENCES).
- context_exports: Manages exported files saved by name; after uninstalling the plugin, existing export files remain on disk and need to be cleaned up manually (see the Exports section in the README).
Refusals and Security Boundaries¶
The README has a “What it refuses” section: for example, ranges already inside ACP blocks will be refused (involving AlreadyCompressedRangeError). Specific rules are subject to the repository documentation. The plugin runs with the current DSH process permissions; before installing, it is recommended to read the source code and LICENSE, and understand that exported files go to a temporary directory (log example: exports in <tmpdir>/billion-context-relief).
Installation and Activation¶
The DSH ecosystem is “everything is a plugin”; the plugin directory entry at SkillHub and the GitHub repository are community-maintained and are not part of DeepSeek / High-Flyer’s official app store.
1. Install ACP first (if the profile doesn’t already have it)
The test combination provided in the materials uses a GitHub pinned ref:
dsh plugin --profile web add "billion-context-dsh@github:Tyan66666/billion-context-dsh#2026-09-30_dsh-0.2-seam-port"
The npm package billion-context-dsh@0.2.26 is marked as expected to work but has not been tested on the relief side.
2. Install billion-context-relief (npm recommended)
dsh plugin --profile web add billion-context-relief
Pinned version example:
dsh plugin --profile web add billion-context-relief@0.1.2
Or install from a GitHub release tag:
dsh plugin --profile web add "billion-context-relief@github:markelayan/billion-context-relief#v0.1.2"
Upgrade:
dsh plugin --profile web update billion-context-relief
dsh plugin add writes to the profile’s package.json and dsh.profile.bundles; a running DSH does not need to be restarted to load it; new tools only appear in sessions started after installation, existing sessions need to be reopened.
3. Confirm loading
When running dsh web, you can check ~/.dsh/dsh-web.log; you should see something like:
[billion-context-relief] ready — tools: context_large_blocks, context_export, context_delete, context_exports · advisor=true · exports in <tmpdir>/billion-context-relief
Uninstall:
dsh plugin --profile web remove billion-context-relief
ACP blocks already written into the session will be retained; exported files need to be deleted according to the documentation.
Typical Usage Flow¶
Below is a reproducible sequence of operations (specific seq values depend on your current session):
- Use ACP-related capabilities or
context_large_blocksto view window usage and the large block list (in the example output you will seeThresholds: message ≥4.0K · turn ≥12.0K · ACP block ≥3.0K tokensand several seq / tool lines). - If a segment is a long log or scraped result that “may need the original text,” call
context_exportwithstartSeq,endSeq, and optionallyname,note. - If a segment is confirmed to have no retention value, call
context_deleteto handle the same range (do not operate on both a turn and its messages). - When you need to clean up exports on disk, use
context_exports.
Every change is an explicit tool call by the Agent; the advisor only provides hints and does not execute on its own.
Suitable Scenarios and Notes¶
Who it’s for: Developers already using billion-context-dsh (ACP) on DSH 0.2.0-rc.2 who want the Agent to be able to “externalize the original text” or “directly discard” context beyond just “summaries.”
Important notes:
- You must first install ACP and make it the active compaction engine; otherwise this plugin will not take effect.
- Package size is approximately 19 kB (packed), no runtime dependencies, but depends on correctly parsed
billion-context-dshwithin the profile. - For configuration details, advisor trigger conditions, and complete behavior of the export directory, see the GitHub README; this article is based only on facts appearing in the public README and
package.json. - The plugin and DSH read/write files and sessions with the local user’s permissions; please review the source code before installing in production or sensitive environments.
Conclusion¶
billion-context-relief extends context management from “only summaries can be compressed” to “export with pointer” and “delete without file,” and all operations are completed through explicit Agent calls, consistent with ACP’s compress path, making it easy to fine-tune burden reduction in long sessions.
- Directory page: https://www.skillhub.cn/plugins/markelayan/billion-context-relief
- Source code and documentation: https://github.com/markelayan/billion-context-relief
- npm: https://www.npmjs.com/package/billion-context-relief