mirror of https://github.com/garrytan/gstack.git
The PreToolUse question-preference-hook emitted `permissionDecision: "defer"` on its pass-through path. `"defer"` is not a valid Claude Code permissionDecision — the spec defines only `allow` / `deny` / `ask`. Native Claude Code silently ignored the unknown value and fell through to normal flow, so it appeared to work. Conductor's `mcp__conductor__AskUserQuestion` bridge does NOT ignore it: an unrecognized permissionDecision on its own injected tool hangs the round-trip, so the question never renders and no tool_result is returned (the harness substitutes "[Tool result missing due to internal error]"). Because defer() fires on every ordinary question with no never-ask enforcement, this broke AskUserQuestion entirely for Conductor users whenever the gstack plan-tune hooks were installed. Fix: express "no opinion" the spec-correct way — emit no permissionDecision. Emit nothing at all when there is no additionalContext; surface additionalContext (Layer 8 memory) alone otherwise. The deny enforcement path is unchanged (deny is spec-valid). - Update the defer() contract + tests (defer => no permissionDecision). - Add a Conductor regression test: ordinary AUQ question => empty stdout. - Correct docs/spikes/claude-code-hook-mutation.md, which incorrectly documented "defer" as a valid permissionDecision value. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| hooks | ||