dsh-bite (Hook Bite): Automatic Recovery of Pinned Critical Rounds After Compression

Introduction

In DeepSeek Harness (DSH), during long conversations, the host often triggers context compaction: earlier raw text is condensed into summaries, and the model loses sight of the verbatim content of the compressed turns. If a conclusion, constraint, or interface agreement appears only in those compressed messages, subsequent reasoning is prone to “memory loss”—this is not a model capability issue, but rather a fact that the source text is no longer in the context window.

Common workarounds include manually copying important paragraphs, pasting them repeatedly, or relying on whether the summary happens to mention the key points; the former is tedious, the latter is uncontrollable. dsh-bite addresses this exact pain point: it pins the entire selected “User Question + Assistant Reply” turn. After compaction removes the pinned source text, the plugin automatically retrieves and re-injects it before the next model request, clearly marking it as historical background rather than a new instruction. Below, we introduce what it is, how to install it, how to use it, as well as its mechanism and limitations.

What is this

dsh-bite is a community-maintained DSH client plugin (Maintainer: wobenshiwomu, Repository: wobenshiwomu/dsh-bite). In one sentence: Pinned key turns are automatically retrieved and re-injected after context compaction—compaction cannot take them away. The Web UI provides a pin button, accompanied by a “fat fish” predation animation when the pin is set. The plugin runs as a Cordis plugin within the DSH ecosystem; it does not replace the compaction backend but only restores the content you explicitly marked after compaction occurs.

Core Features

Pin Button and Animation

There is a small button on the action row of each assistant reply: a green “Pin” button changes to red “Pinned” after clicking; clicking again unpins it. When a pin is set, a Q-style “fat fish” darts out from the left side of the screen at the height of the button, and the button only changes color the moment the fish’s mouth crosses it—data processing takes precedence; the animation is just the presentation layer.

Anti-Compaction Retrieval

The plugin listens for compaction events in the session; when compaction flushes the source text of a pinned turn out of the current request window, it automatically injects the pinned content (the user’s original text + the reply at that time) back before the next model request, noting “this is historical background, not a new instruction.” By default, it fully preserves the original text (no truncation); the default limit is 12 pins per session, and exceeding this discards the oldest pins while notifying the user in the response.

Slash Commands (UI-less Consistency)

  • /pin: Pin the most recent turn
  • /pins: List pins (with summaries)
  • /unpin: Unpin the latest one
  • /unpin 2: Unpin by index

Auditing and Logging

Retrieval notes utilize session events with source.kind = 'dsh-bite', making them auditable and searchable in logs.

Installation and Activation

The plugin runs with the permissions of the current DSH process; before installation, it is recommended to review the source code and MIT license on GitHub to ensure compliance with your security policies.

Direct GitHub Installation (Recommended in README, connects directly to codeload for networks in China, no npm account required):

dsh plugin --profile web add 'https://codeload.github.com/wobenshiwomu/dsh-bite/tar.gz/v0.1.1'

Or in the GUI: Sidebar “Plugins” -> Add Plugin -> Enter the URL above. Restart DSH after installation to activate. The v0.1.1 segment at the end of the URL is the version tag; to upgrade, replace it with the new version tag from this repository and reinstall.

Local/Development Installation (Local path):

dsh plugin --profile web add /path/to/dsh-bite

Environment Requirements (from package.json): Node ^22.19.0 || >=24.0.0, DSH >=0.2.0-rc.1.

No configuration required, works out of the box: Pins are stored by default in $DSH_HOME/storages/dsh-bite/; the client buttons and fat fish animation are bundled with the plugin.

Optional configuration is written in the profile user layer cordis.patch.yml; it is only necessary if you want to change default values:

- id: dsh-bite
  config:
    maxPins: 12          # Max pins per session (discard oldest if exceeded)
    maxPinChars: 0       # 0=Full preservation (default); set positive number to truncate by budget (User 40% / Reply 60%)
    # storageDir: ''     # Directory for storing pins, default $DSH_HOME/storages/dsh-bite
Key Default Description
maxPins 12 Max pins per session
maxPinChars 0 0 preserves full text; >0 truncates by budget
storageDir $DSH_HOME/storages/dsh-bite Pin storage directory

Typical Usage

  1. In the Web conversation, find the assistant reply that needs long-term retention and click the green “Pin” on the action row; click the red “Pinned” to undo.
  2. In non-UI scenarios: Run /pin at the end of the conversation to pin the latest turn, use /pins to view the list, and use /unpin or /unpin [index] to unpin.
  3. Continue chatting normally; when a session compaction occurs and the pinned message is no longer in the current request window, the plugin will automatically inject the lost pinned content before the next message is sent.

Animation parameters (fish height 240px, duration 900ms, etc.) are located at the top of src/client/index.jsx in the repository; you can modify them there if fine-tuning is required.

Working Mechanism (Brief)

  1. Setting the Pin: After clicking the button or running /pin, the host locates that turn by messageId in the session log, traces back to the nearest real user message (skipping plugin injection notes), and packages the user’s original text and the reply into a pin.
  2. Monitoring Compaction: Listens to session/event, recording every compaction/end.
  3. Retrieval: In agent/pre-step, if new compaction has occurred since the last retrieval and at least one pinned message is no longer in the current request window, the truly lost pins are concatenated into a note and injected, marked with source.kind = 'dsh-bite', subtype = 'digest'.
  4. It works with both official basic or third-party compaction engines: it does not replace compaction, but only retrieves pins after compaction.

Use Cases and Notes

Suitable for: DSH Web users who need to fix several “decision turns” of original text (requirement finalization, error root causes, configuration agreements, etc.) in long sessions and do not want to manually paste after every compaction; headless or command-line users can use slash commands to complete the same workflow.

Limitations to be aware of (from README):

  • The retrieval timing is “before the next request”: if you do not send a new message for a long time after compaction, pins will not be actively injected.
  • Compaction summaries may also contain generalizations of pinned content; retrieval notes act as a fallback and can coexist with summaries.
  • Sub-agent sessions do not participate in retrieval.
  • By default, the original text is fully preserved. The more and longer the pins, the more context is occupied during retrieval; you can set maxPinChars as needed or weigh costs alongside compaction strategies.
  • /pin may have the same command name as other plugins in the ecosystem (such as dsh-pin-recall); if installed together, conflicts are resolved by the first one registered.

The DSH community plugin directory is located at the independent site SkillHub Plugin Page; it has no official affiliation with DeepSeek / High-Flyer. The installation source is the GitHub repository and the aforementioned codeload URL.

Conclusion

dsh-bite transforms “key turns” from “hoping they are mentioned in the summary” to “retrievable by pins in full or by budget after compaction,” and provides Web buttons, slash commands, and session event logging. If you are doing long-chain agent conversations in DSH, you can start by installing v0.1.1 directly via the README and verifying in a couple of real compaction scenarios whether the retrieval meets expectations.

  • Directory Page: https://www.skillhub.cn/plugins/wobenshiwomu/dsh-bite
  • GitHub: https://github.com/wobenshiwomu/dsh-bite
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye