dsh-context-guard: Session Handoff and Context Pressure Monitoring
`dsh-context-guard` is a workflow plugin for DeepSeek Harness (DSH) designed to address the escalating cost of long sessions. When session usage exceeds 45%, it automatically reminds the user to end the session and start a new one, and generates a handoff document containing machine facts in the working directory. Its core advantage is a “zero context tax”: it registers no tools, injects no prompts, and sends no extra requests, performing all calculations entirely within the host process using official token-meter data. It supports English and Chinese, triggers by default at a 45% threshold, and refreshes the handoff document for every additional 5% increase. The plugin uses atomic writes, enforces strict permission restrictions, and includes safety boundary checks.
Read Moredsh-context-guard: A Token-Efficient Tool Result Pruning Plugin for DeepSeek Harness
`dsh-context-guard` is a plugin for DeepSeek Harness (DSH), intended to address context overflow caused by the large size of tool results in long sessions. It controls token consumption by pruning oversized tool results. Specifically, it replaces regular results with an approximately 2.3K-character preview (retaining the beginning and end) before the next request, while storing the original data in an append-based history for targeted recovery. The plugin supports search and recall strategies and must be used with specific threshold settings and a Persona prompt. DSH must be restarted after installation.
Read More