You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: hook events and AGENTS.md context for subagents (Agent/Task tool) #986
What we measured (live sessions, subagent rollout file inspection):
Subagents receive no hook events at all. The main agent fires SessionStart / UserPromptSubmit / PreToolUse / PostToolUse hooks, but agents launched via the Agent/Task tool trigger zero hook invocations — their rollout files contain no hook references whatsoever.
AGENTS.md context is inconsistent across subagent types:
Explore subagent: ~14,045 chars injected (skills list only — zero AGENTS.md content)
general-purpose subagent: ~55,696 chars (full AGENTS.md from both scopes)
So a governance layer built on hooks (policy injection, delivery receipts, memory index) works for the main agent and is completely invisible to subagents — including read-only Explore agents that then operate without the project's rules.
Request:
Fire hook events for subagent sessions (or add a dedicated SubagentStart / SubagentPromptSubmit event), or provide a config option to enable it.
Make AGENTS.md delivery consistent (or configurable) across subagent types.
Bonus: a per-subagent-type context budget/allowlist setting.
This matters for teams using ZCode in governed environments where compliance hooks must cover every agent that touches the repo.
Activity
github-actions commentedon Oct 10, 2026
👋 感谢你的反馈,我们已经收到。
status: 待评估,你可以随时补充信息。needs: 更多信息标签并 @ 你。👋 Thanks — we've received your issue.
status: 待评估(Triage); feel free to add context.needs: 更多信息and ping you.dominiclafleur commentedon Oct 30, 2026
工具级 Hook 的根因分析与经单测验证的修复分支见 #361 (comment) (子代理 runtime 配置漏继承 hooks / workspace 快照;补丁含回归测试)。