Summary
Please add a non-blocking soft-warn path for Grok Build CLI hooks so agents can see policy reminders without denying the tool call.
Today, PreToolUse only documents:
{"decision": "allow"}
{"decision": "deny", "reason": "..."}
deny + reason reaches the agent (Hook denied: ...) and works for hard blocks.
- Soft signals (
systemMessage, Claude-style hookSpecificOutput.additionalContext, or decision: allow + reason) do not reliably enter the model context on Grok Build, so plugins like hookify cannot implement action: warn (educate the agent, do not block the write).
This forces a bad tradeoff:
| Approach |
Agent sees message? |
Tool continues? |
decision: deny |
Yes |
No (stalls agent turns / freezes editing) |
decision: allow + reason / additionalContext |
No (current behavior) |
Yes |
Why it matters
Claude Code documents soft inject via hookSpecificOutput.additionalContext (and has its own issues when only systemMessage is used — see anthropics/claude-code#20747, #25987). Grok Build already loads Claude-compatible plugins and hooks/hooks.json, but without soft inject, warn-style rules cannot educate the agent on Grok.
Use case example: a warn rule for full-width Chinese punctuation / emoji in file content — we want the model to correct style without blocking every write (blocking makes the agent appear stuck).
Requested behavior
For PreToolUse (and ideally PostToolUse, which currently ignores stdout as passive):
- When the hook returns allow (or omits deny) and includes a message field, inject that text into the next model turn context (same class of mechanism as Claude
additionalContext / a system-reminder block).
- Suggested accepted fields (any one is fine if documented):
reason on allow
systemMessage
hookSpecificOutput.additionalContext
- Optionally surface soft messages in TUI
hook_annotation (today annotations appear for blocked tools; soft allow often produces no agent-visible annotation).
- Keep deny semantics unchanged for hard blocks.
Environment
- Grok Build CLI
0.2.93 (local)
- Docs: bundled
10-hooks.md (allow/deny only; PostToolUse stdout ignored)
- Plugin: hookify (Claude Code + Grok dual use)
Notes
Thanks.
Summary
Please add a non-blocking soft-warn path for Grok Build CLI hooks so agents can see policy reminders without denying the tool call.
Today, PreToolUse only documents:
{"decision": "allow"} {"decision": "deny", "reason": "..."}deny+reasonreaches the agent (Hook denied: ...) and works for hard blocks.systemMessage, Claude-stylehookSpecificOutput.additionalContext, ordecision: allow+reason) do not reliably enter the model context on Grok Build, so plugins like hookify cannot implementaction: warn(educate the agent, do not block the write).This forces a bad tradeoff:
decision: denydecision: allow+ reason / additionalContextWhy it matters
Claude Code documents soft inject via
hookSpecificOutput.additionalContext(and has its own issues when onlysystemMessageis used — see anthropics/claude-code#20747, #25987). Grok Build already loads Claude-compatible plugins andhooks/hooks.json, but without soft inject, warn-style rules cannot educate the agent on Grok.Use case example: a
warnrule for full-width Chinese punctuation / emoji in file content — we want the model to correct style without blocking every write (blocking makes the agent appear stuck).Requested behavior
For PreToolUse (and ideally PostToolUse, which currently ignores stdout as passive):
additionalContext/ a system-reminder block).reasonon allowsystemMessagehookSpecificOutput.additionalContexthook_annotation(today annotations appear for blocked tools; soft allow often produces no agent-visible annotation).Environment
0.2.93(local)10-hooks.md(allow/deny only; PostToolUse stdout ignored)Notes
/hooks./feedbackonly), please point maintainers/users to the right channel.Thanks.