dsh-switchman
Sessions and messages (`session`): built to defuse the three ways a long agent session fails. 1) The context window fills up — the session gets dull, forgets earlier agreements, or dies mid-task. The plugin manages the context watermark end to end: automatic folding at idle boundaries with a persisted fold ledger and deterministic rebuild (the serialized prefix stays byte-identical between folds, so the provider prompt-prefix cache keeps hitting), a protected recent tail, three escalating watermark tiers, and an automatic write-handover-doc-then-compact at the top tier that never abandons running subagents — the main session never explodes, and token spend tracks the work instead of the chat length. 2) File edits fail in loops — a missed anchor burns turn after turn. A listener rewrites native `edit` / `str_replace_editor` misses into self-contained corrective feedback: per-match excerpts of the file's exact text, the failure class (whitespace drift, multi-hit, zero-hit…), the correct retry recipe, and a loop-guard that orders a strategy switch after three same-class failures — the model fixes itself on the next try instead of guessing. 3) One model in one burnt-out context loses perspective — advantage-based delegation dispatches across six model pools (economy/mechanical/main/hard/vision/review, optional intent routing) only when it wins: a pristine child context that has not spent a token on your history, an independent model/effort lane, parallelism, blast-radius isolation; detail-bearing edits are still done directly. When two of three structural constraint tags fire in a turn, an Agent Team assembles autonomously; otherwise plain subagent dispatch stays the default, and tiered verification routes larger or core changes to independent reviewers. Also: per-scope out
Overview
Sessions and messages (`session`): built to defuse the three ways a long agent session fails. 1) The context window fills up — the session gets dull, forgets earlier agreements, or dies mid-task. The plugin manages the context watermark end to end: automatic folding at idle boundaries with a persisted fold ledger and deterministic rebuild (the serialized prefix stays byte-identical between folds, so the provider prompt-prefix cache keeps hitting), a protected recent tail, three escalating watermark tiers, and an automatic write-handover-doc-then-compact at the top tier that never abandons running subagents — the main session never explodes, and token spend tracks the work instead of the chat length. 2) File edits fail in loops — a missed anchor burns turn after turn. A listener rewrites native `edit` / `str_replace_editor` misses into self-contained corrective feedback: per-match excerpts of the file's exact text, the failure class (whitespace drift, multi-hit, zero-hit…), the correct retry recipe, and a loop-guard that orders a strategy switch after three same-class failures — the model fixes itself on the next try instead of guessing. 3) One model in one burnt-out context loses perspective — advantage-based delegation dispatches across six model pools (economy/mechanical/main/hard/vision/review, optional intent routing) only when it wins: a pristine child context that has not spent a token on your history, an independent model/effort lane, parallelism, blast-radius isolation; detail-bearing edits are still done directly. When two of three structural constraint tags fire in a turn, an Agent Team assembles autonomously; otherwise plain subagent dispatch stays the default, and tiered verification routes larger or core changes to independent reviewers. Also: per-scope out
Installation
Version compatibility
Independent install test
- Install result
- Installed and registered
- Tested Harness version
0.2.2-rc.1- Tested plugin version
- Not reported
- Test date
Installation notes
- May run terminal commands