gstack/hosts/claude/hooks
Zachary Townsend 4257e8170d fix(plan-tune): stop emitting invalid permissionDecision "defer" (breaks Conductor AUQ)
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>
2026-05-31 10:05:17 -07:00
..
question-log-hook v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
question-log-hook.ts v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
question-preference-hook v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
question-preference-hook.ts fix(plan-tune): stop emitting invalid permissionDecision "defer" (breaks Conductor AUQ) 2026-05-31 10:05:17 -07:00