概览
dsh-session-rescue
README / ZH
插件文档
目录摘要
dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
- **Verified in an isolated `DSH_HOME`, not end-to-end against the stall.** A real headless Harness run loaded the plugin, fired its `agent/status` hook, resolved `ctx.get('compaction')`, and opened a real compaction transaction (`compaction/start` carrying `sourceCommandId: "session-rescue-guard-1"`) — reproduced twice. The stall itself was **not** reproduced, and the "compact before the first turn" ordering is covered by unit tests only. See `docs/DESIGN.md` → *Verification performed*. - **The size threshold is a proxy.** What actually costs time is the replay's per-event work, which cannot be measured from outside without paying for it. `seq` is the driver of the loop and is free to read, so it is used as the proxy — calibrated, not derived. - **One link is unproven.** Compaction demonstrably made the next cold start cheap in all three observed episodes (never-returning → 1.6–10 s), but *why* is not established: it cannot be by shortening the replay, since `seq` does not shrink. The plugin relies on the measured effect, and `docs/DESIGN.md` records the question as open. - **Compaction costs an LLM call** (15–20 s on the observed 300 k-token sessions) and rewrites history into a summary. That is a real change to your conversation, by design — the same operation `/compact` performs. Set `enabled: false` for report-only mode. - The earlier v0.1 approach (detect a stalled turn → cancel → cold rebuild) has been **removed**: the stall is a synchronous CPU loop, so `signal.throwIfAborted()` never gets a chance to run and cancellation cannot interrupt it.
