
Areium/dsh-fail-logger
81最近提交 2026年8月14日
dsh-fail-logger DSH 插件
dsh-fail-logger 监听会话事件,将工具失败(原生工具和 PTC)记录到技能的自动日志区域。它对失败进行标准化、去重、计数,并按频率排序,支持 TTL 清理和脱敏。下一会话的模型可以加载该技能,查看常见失败原因,从而随着时间的推移减少失败。
如何安装 dsh-fail-logger DSH 插件
dsh plugin --profile web add dsh-fail-logger复制不会执行命令。安装 dsh-fail-logger DSH 插件前请核对仓库和版本。
dsh-fail-logger DSH 插件数据来源
dsh-fail-logger DSH 插件快照日期:2026年8月16日
discovered
dsh-fail-logger DSH 插件能做什么
- 自动从会话事件中捕获工具失败(原生工具、PTC 代码执行、嵌套工具调用)。
- 标准化去重:路径和长数字被标准化后再哈希,使相似错误合并。
- 每日趋势线:显示最近 7 天的失败次数,支持 TTL 清理过期条目。
- 分类渲染:失败按文件系统、权限、超时、网络等分组,并带有基于规则的建议。
- 可选的始终开启推送预防指令,注入代码时规则以避免执行错误。
- 跨进程锁合并:安全支持 web/headless 并发;原子写入并带有损坏恢复。
dsh-fail-logger DSH 插件适合哪些场景
- 通过审查技能中累积的日志,调试重复出现的工具失败。
- 帮助模型从过去的错误中学习,无需人工干预。
- 识别跨会话频繁出现的权限或 I/O 问题。
- 比较不同工作区或代理的失败模式。
- 跟踪失败趋势,衡量插件安装后的改进效果。
dsh-fail-logger DSH 插件适合谁
- 使用 DeepSeek Harness 并希望减少重复工具失败的开发者。
- 运行自主代理、需要从执行错误中自我改进的用户。
dsh-fail-logger DSH 插件的限制
- 仅记录到达会话日志的失败;工具执行期间的灾难性进程死亡不在范围。
- 非零退出码不记录(DSH 语义,非插件 bug)。
- 去重是启发式的:相同原因表述不同可能分裂,不同原因表述相同可能合并。
- 显示保留原始文本(仅路径/用户名标准化用于去重键);隐私需明确配置红名单。
- 始终开启的指令每步增加约 42-65 tokens(可通过配置禁用)。
- 对于简单单轮任务,模型可能不会加载技能;仅在任务提及失败分析或历史比较时可靠加载。
dsh-fail-logger DSH 插件的仓库 README 摘录
以下文字摘自 dsh-fail-logger DSH 插件的上游仓库 Areium/dsh-fail-logger 的 README,版权归原作者,仅作引用。
An all-mode tool failure recorder for DeepSeek Harness: whether the agent runs in **native mode** or **PTC (Code Mode)**, any tool failure is automatically written into the machine-maintained section of a skill — normalized-dedup, counted, deterministically ranked, TTL-pruned, and redacted — so the next session's model sees the most common failure causes when it loads the skill. **Fail less over time.** ## Coverage matrix & trigger conditions | Execution mode | Failure source | Recorded as (kind / message) | |---|---|---| | Native tools (read/grep/write and third-party plugin tools…) | `tool/call` + `tool/result` (tool-result block isError=true) | `tool` / `[read] ENOENT: no such file …` | | PTC `run_code` failures | `tool/result` (isError=true) | official kind (`exception`/`timeout`/`abort`/…) / raw message | | Nested tool calls inside a code program (`tools.*` throwing) | `tool/code-dispatch` (isError=true) | `tool` / `[bash] exit code: 1` | > **Trigger condition**: a failure is recorded only when the tool result is marked `isError: true`. **A non-zero shell exit code does NOT trigger recording** (e.g. `exit 1` is presented as plain text `[exit code: 1]`, not an error) — only
阅读完整 README仓库许可: MIT
dsh-fail-logger DSH 插件常见问题
如何安装 dsh-fail-logger?
在终端中运行 `dsh plugin --profile web add dsh-fail-logger`。你也可以指定版本,例如 `dsh plugin --profile web add dsh-fail-logger@0.5.1`,或从 GitHub 发布标签安装。安装后重启 `dsh --profile web`。插件零配置即可工作。
这个插件支持 headless 模式吗?
是的,它也支持 headless 模式。使用 headless 配置运行相同的命令,例如 `dsh plugin --profile headless add dsh-fail-logger`。插件监听会话事件,不论执行模式如何都会记录失败。
插件记录哪些类型的失败?
它记录会话事件中标记为 `isError: true` 的工具失败。包括原生工具失败(如读取不存在的文件、grep 失败)、PTC 'run_code' 失败,以及代码程序内部的嵌套工具调用失败。非零退出码(如 `exit 1`)不会被记录,因为 DSH 将其视为纯文本而非错误。
如何查看记录的失败?
插件将失败写入技能目录,通常位于 `~/.dsh/skills/fail-log-guide/SKILL.md`。你可以打开该文件查看 FAIL-LOG 部分,其中包含去重、计数和排序后的失败信息。技能的描述设置为让模型在需要失败分析时加载它。
能否禁用始终开启的指令以节省 token?
可以,在插件配置中设置 `config.injectInstructions: false`。这将禁用每步注入的推送预防指令。即使没有该指令,拉取式功能(技能加载和失败日志)仍然保持有效。