dsh-ctm
Run the following command in DeepSeek Harness:
dsh plugin install ac0033/dsh-ctm
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install ac0033/dsh-ctm in DeepSeek Harness to install this plugin, source code at https://github.com/ac0033/dsh-ctm
About this plugin
In long multi-turn agent sessions, the context the model actually sees remains a black box: which tokens were cache hits, which segments have gone stale, what the current system prompt looks like—developers often have no way to inspect any of it until something goes wrong. dsh-ctm breaks the full context into a turn-to-segment flow, color-coded by role, token count, and cache status, with provider-measured MECE token accounting (uncached input, cache hit, output) and a derived cache hit rate that makes per-turn context cost legible at a glance.
Beyond visibility, dsh-ctm ships an effectiveness engine that auto-classifies every segment as effective, redundant, stale, or injected with manual override support, and lets users replace, delete, roll back, or restore individual segments. When Apply for Real is enabled, edits are written into the session log as surface replace events, guaranteeing that replay, fork, and token accounting always reflect exactly what the model saw. The initial system prompt is editable in place, and changes take effect at the next prompt assembly without restarting the session.
The plugin communicates with the host over a single plain HTTP POST /ctm endpoint, carries zero runtime dependencies, and inlines Zod into its build artifacts so it works out of the box. It is aimed at prompt engineers, agent developers, and researchers who need to inspect, prune, or audit long context windows in production DeepSeek Harness deployments.
Screenshots
Use Cases
- Identifying token waste and cache hit rates in long agent sessions
- Replacing and editing the system prompt live without restarting
- Auditing redundant, stale, or injected segments and rolling them back
Best For
- Prompt engineers who iterate on context windows daily
- Platform operators auditing token spend in production agent sessions
- Researchers studying context compaction and prompt engineering
Related Plugins
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.
An opinionated, zero-infrastructure file-based memory protocol: human-readable markdown files plus a bounded always-loaded index, curation discipline, and no database or embeddings.