TT-Wang/dsh-slice-agent-loop

Swaps the DeepSeek Harness agent loop for a 'slice loop': every turn the model receives exactly the context it needs — no more, no less. Instead of replaying the full conversation history (which dilutes attention, loses detail irreversibly at compaction, and grows cost quadratically), the loop maintains a bounded, rebuildable context slice with an upper bound and recoverable information: nothing is trimmed that cannot be brought back. Same harness, same model, same tools and persistence — only the loop is swapped.

Agent Capabilities ★ 2 updated 2026-09-21 ✅ runtime-tested
View on GitHub ↗

Install

dsh plugin --profile web add "github:TT-Wang/dsh-slice-agent-loop#main"

dsh plugin --profile web add "github:TT-Wang/dsh-slice-agent-loop#main" (repo TT-Wang/dsh-slice-agent-loop, English README, verified 2026-08-31). Or clone and dsh plugin --profile web add . from the checkout. Restart web afterwards — bundles are composed at boot. The bundled patch disables the stock loop and compaction; if your composition carries an agent-loop-invariant row, remove it — the plugin refuses to load beside that assertion.

Compatibility

DSH web profile; early beta tracking DSH 0.1.2-alpha.2 (slash-route wire + cookie auth); replaces the stock agent loop and compaction; refuses to load beside agent-loop-invariant rows.

Details

Recent updates

Bounded rebuildable context slice per turn; upper bound + recoverable history; replaces stock loop & compaction; early beta (0.1.2-alpha.2); conflicts with agent-loop-invariant rows.

FAQ

Is this stable enough for production?
It is an early beta tracking DSH 0.1.2-alpha.2 — the bundled bench driver speaks the new protocol. Test on a scratch profile before relying on it daily.
What does it replace?
The stock agent loop and its compaction pass: the plugin's bundled patch disables both, and the bounded rebuild replaces them.
Why does it refuse to load beside an agent-loop-invariant row?
A rebuilt slice cannot equal the derived history byte-for-byte, so loading beside that assertion would be unsound — remove the agent-loop-invariant row from your composition.

Alternatives

dongsheng123132/dsh-cache-stabilizer · jiesou/dsh-stream-rules · dongsheng123132/dsh-action-parity

More plugins in Agent Capabilities

Browse more in Agent Capabilities

Guides for Agent Capabilities plugins