QuanhuZeYu/dsh-idle-compactor ↗★ 0
dsh-idle-compactor
Idle-triggered context compaction for DeepSeek Harness: compact a session once it has gone quiet past a token floor
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:QuanhuZeYu/dsh-idle-compactor说明文档
阅读完整 README ↗Configuration
Set it in the profile's cordis.patch.yml (later layers win, and a patch replaces the whole config, so
restate every key you keep):
- id: idle-compactor
config:
thresholdTokens: 131072 # 128K
idleMs: 600000 # 10 minutes
| Key | Default | Meaning |
|---|---|---|
enabled | true | Register no sweep at all when false. |
thresholdTokens | 131072 | Context floor. Use 128000 for a decimal 128K. |
idleMs | 600000 | Quiet window before a session is eligible. |
scanMs | 30000 | Sweep interval; bounds how long after idleMs the compaction lands. |
includeSubagents | false | Also compact sessions whose header carries origin: subagent. |
excludeArchived | true | Skip sessions the workspace registry reports as archived. |
skipAwaitingWork | true | Never compact a session with background work outstanding — its own or a live descendant's. |
waitWarnMs | 10800000 | Log one warning per wait episode once it has held a session this long. |
cooldownMs | 60000 | Minimum spacing between compactions of one session. |
retryBackoffMs | 300000 | Wait after a failed attempt or a "no compactable range" result. |
maxPerScan | 1 | Sessions per sweep, bounding concurrent summarization calls. |
dryRun | false | Log what would be compacted; write nothing. |
Unknown keys and out-of-range values throw at load.