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
fix(ghook): stop double-emitting Claude PreToolUse denies [project-#147]
For --cli=claude, narrow the legacy stderr+exit(2) channel to
responses that explicitly set top-level continue:false with a
non-empty stopReason (the HARD_STOP shape). All other responses --
including PreToolUse denies that arrive via
hookSpecificOutput.permissionDecision:"deny" -- now go to stdout
JSON + exit 0, matching the contract the Python ClaudeCodeAdapter
already targets (PRE_TOOL_USE is in
DECISION_STYLES_ALLOWED_TO_CONTINUE_ON_DENY, so the daemon never
adds the second channel itself).
Previously ghook synthesized a second deny channel on top of the
structured one, so Claude rendered every PreToolUse deny twice --
once as a permission denial, once as a "hook blocking error".
Codex/Gemini/Qwen/Droid paths are unchanged; their is_blocked
contract still flows through the legacy tail of
action_from_success_response.
Bumps crates/ghook to 0.4.1; renames the unreleased CHANGELOG
section in place; updates ghook docs version refs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ All notable changes to gobby-cli are documented in this file.
7
7
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
8
8
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
10
-
## [0.4.0] — gobby-hooks
10
+
## [0.4.1] — gobby-hooks
11
11
12
12
### Added
13
13
@@ -22,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
23
23
-**Droid blocking semantics** — droid daemon responses with `continue:false` now exit 2 with the daemon reason while preserving the response JSON on stdout. Other droid block JSON is forwarded on stdout with exit 0 for droid's hook protocol, and daemon transport failures surface as exit 1 stderr diagnostics.
24
24
25
+
### Fixed
26
+
27
+
#### gobby-hooks
28
+
29
+
-**Stop double-emitting Claude PreToolUse denies** — for `--cli=claude`, ghook now narrows the legacy `stderr+exit(2)` channel to daemon responses that explicitly set top-level `continue:false` with a non-empty `stopReason` (the HARD_STOP shape). All other responses — including PreToolUse denies that arrive via `hookSpecificOutput.permissionDecision:"deny"` — are emitted as JSON on stdout with exit 0, matching the structured-channel contract the Python `ClaudeCodeAdapter` already targets. Previously, ghook synthesized a second deny channel on top of the structured one, causing Claude Code to render every PreToolUse deny twice (once as a permission denial, once as a "hook blocking error"). Codex/Gemini/Qwen/Droid paths are unchanged.
0 commit comments