context-budget
Run the following command in DeepSeek Harness:
dsh plugin install ChenneyZhuang/context-budget
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install ChenneyZhuang/context-budget in the DeepSeek Harness terminal to install this plugin. The source code is available at https://github.com/ChenneyZhuang/context-budget. Restart your session after installation to apply changes.
About this plugin
Long tasks rarely fail at the start; they fail at 80%, when the window is stuffed with re-read files and the original plan has scrolled out of view. context-budget treats the context window as a finite budget: read the head first to learn the shape, then the specific section, then targeted search. A full read is a deliberate purchase, made only when the head read proves the middle matters. Established facts, decisions, and file paths land in a working notes file one line each. At phase boundaries, restate the plan and current state in three lines. Together, these habits let an agent stay grounded after compaction instead of running on fumes.
The core capability boils down to three mechanical habits: graduated reads (head, section, search), notes to disk (notes beat memory), and checkpoint restatement. The notes file survives compaction; the conversation does not, making it a reliable anchor across runtime resets. Checkpoints keep direction intact at phase transitions.
Best suited for agent workflows that span many steps and files. For tasks under roughly ten steps, the small write overhead of the budget machinery outweighs the savings, and the plugin can be safely skipped.
Use Cases
- An agent loses early decisions and file paths after context compaction during a multi-file refactor
- Running a 20+ step E2E debug loop where the same large file keeps getting fully re-read
- Sustaining a large code-generation project across multiple agent sessions while keeping the plan consistent
Best For
- Agent users running multi-step, multi-file long tasks
- Developers who frequently hit context-window overflow or state loss after compaction
- Engineers building production-grade LLM agent workflows
Related Plugins
Memory layer for coding agents that indexes local session history and auto-recalls relevant context before edits, commands, and failures, with no manual search needed.
Traceable, searchable cross-session memory for AI agents that turns conversation knowledge into a typed knowledge graph and recalls relevant subgraphs instead of replaying full history, natively integrated with DeepSeek Harness.
Gives DSH AI cross-session long-term memory, to-do and skill management, plus multi-session orchestration, external AI delegation, and an infinite canvas that grows with you.
dsh-mnemon is a three-tier, pluggable, Agent-driven memory system for DeepSeek Harness, combining Runtime memory, Project Documents, and replaceable Memory Spaces with nine long-term providers.