Skip to content

[Bug] ZCode: Can't install destructive command guard (dcg plugin) #154

Closed as not planned

Description

@ganuong11

提交前确认 · Pre-submission checklist

  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.

问题类别 · Category

工具调用 / MCP · Tool use / MCP

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

严重程度 · Severity

阻塞使用 · Blocking (无法使用核心功能 / core function unusable)

复现频率 · Reproducibility

必现 · Always

问题描述 · Description

Can't install https://github.com/Dicklesworthstone/destructive_command_guard, the hook for PreToolUse didn't work/fire event:

{
"hooks": {
"events": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "bash "${ZCODE_PLUGIN_ROOT}/hooks/dcg-adapter.sh"", "timeout": 10 }
]
}
]
}
}
}

复现步骤 · Steps to reproduce

the hook for PreToolUse didn't work

期望表现 · Expected behavior

the hook for PreToolUse work

实际表现 · Actual behavior

the hook for PreToolUse didn't fire event

ZCode 版本 · ZCode version

v3.3.6

设备 / 系统 / 浏览器 · Device / OS / Browser

Mac

截图 / 录屏 / 日志 · Screenshots / Recordings / Logs

No response

Activity

  1. added
    status: 待评估
    type: Bug
    on Jul 18, 2026
  2. github-actions commented on Jul 18, 2026

    @github-actions

    👋 感谢你的反馈,我们已经收到。

    • 维护者会在 3 个工作日内 给出首次响应。
    • 状态保持为 status: 待评估,你可以随时补充信息。
    • 信息不全时我们会打上 needs: 更多信息 标签并 @ 你。

    👋 Thanks — we've received your issue.

    • A maintainer will respond within 3 business days.
    • Status stays at status: 待评估 (Triage); feel free to add context.
    • If we need more details, we'll add needs: 更多信息 and ping you.
  3. changed the title [-][Bug] Can't install destructive command guard (dcg plugin)[/-] [+][Bug] ZCode: Can't install destructive command guard (dcg plugin)[/+] on Jul 18, 2026
  4. ganuong11 commented on Aug 13, 2026

    @ganuong11
    Author

    Do we have any update?

  5. panda920 commented on Aug 17, 2026

    @panda920
    Collaborator

    这条和 #167 是同一个问题,已合并到 #167 统一跟进。

    共同根因:hooks 在配置/插件里注册成功、UI 也显示已加载,但运行时多个事件(Stop、PreToolUse、SubagentStart/Stop 等)从不触发,导致依赖 hook 的插件(dcg、SAP 等)整体失效。

    合并是为了让研发看到完整上下文,而不是同一件事被拆成 4 条各自跟进。你的反馈没有丢——我已经在 #167 里把这几条一起列了出来,后续进展都会更新在那边,建议去 #167 点一下 Subscribe。

    如果你认为这其实是另一个问题,直接回复本条,我们会重新拆开。


    This is the same problem as #167, and is now tracked there.

    Shared root cause: Hooks register successfully in config/plugins and show as loaded in the UI, but several events (Stop, PreToolUse, SubagentStart/Stop, …) never fire at runtime, which breaks any plugin built on hooks (dcg, SAP, and others).

    We're consolidating so the team sees one complete picture instead of the same thing split across 4 issues. Nothing is lost — your report is listed in #167, all updates will go there, and you're welcome to subscribe to it.

    If you think this is actually a different problem, reply here and we'll split it back out.

  6. added
    duplicate
    on Aug 17, 2026
  7. removed
    status: 待评估
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicatepriority: P2type: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions