PulseAugur
实时 19:13:12
English(EN) Claude Code hooks stop firing on MCP tools after the first deny (found it while trying to cut tokens)

Claude Code hook 错误导致工具调用在第一次拒绝后停止

用户在使用 Claude Code 时遇到一个问题,即工具使用 hook 在第一次拒绝后停止工作。用户试图通过 PreToolUse hook 将文件读取重定向到本地 LLM 摘要工具来减少 token 使用量。然而,在 hook 拒绝了 'Read' 工具后,尽管模型似乎调用了本地摘要工具,但 hook 未记录后续调用。在 Windows 11 Home 上运行的 Claude Code 2.1.227 上观察到了这种行为。用户还指出,本地摘要可能不可靠,导致模型重新验证信息或产生不准确的结果。 AI

影响 Claude Code hook 系统中的此错误可能会阻碍开发人员自定义工具使用,并通过阻止使用本地模型进行摘要来潜在地降低效率。

排序理由 用户报告了特定工具的 hook 功能存在错误。

在 dev.to — MCP tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

Claude Code hook 错误导致工具调用在第一次拒绝后停止

报道来源 [1]

  1. dev.to — MCP tag TIER_1 English(EN) · Chikoku_NEKO ·

    Claude Code hooks stop firing on MCP tools after the first deny (found it while trying to cut tokens)

    <h2> TL;DR </h2> <ul> <li>I tried to cut Claude Code's token use by having a <code>PreToolUse</code> hook <code>deny</code> Read and redirect the model to a local LLM summary tool.</li> <li>The hook log contained not a single row for the local summary tool. But the tool was being…