mirror of https://github.com/garrytan/gstack.git
The PreToolUse transport-avoidance in question-preference-hook only guarded against Conductor. The Claude Desktop app (CLAUDE_CODE_ENTRYPOINT=claude-desktop) advertises + enables AskUserQuestion (CLAUDE_CODE_ENABLE_ASK_USER_QUESTION_TOOL=true) but its handler returns "[Tool result missing due to internal error]". PostToolUse hooks do NOT fire on that transport-error path, so auq-error-fallback-hook cannot rescue it after the fact — the model just sees the raw error. Extend the existing PreToolUse deny to also fire when CLAUDE_CODE_ENTRYPOINT=claude-desktop, redirecting to the same prose decision brief. Generalize the reason label ([conductor] / [claude-desktop]). Tests: mirror the ambient-env strip (delete CLAUDE_CODE_ENTRYPOINT) in the two hook test runners so a suite run inside Claude Desktop stays deterministic, and add a "Claude Desktop prose redirect" describe block paralleling the Conductor cases. Verified on claude.exe 2.1.197 (Windows): the identical AUQ call that returned the missing-result error now returns the [claude-desktop] prose-redirect deny. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| claude/hooks | ||
| claude.ts | ||
| codex.ts | ||
| cursor.ts | ||
| factory.ts | ||
| gbrain.ts | ||
| hermes.ts | ||
| index.ts | ||
| kiro.ts | ||
| openclaw.ts | ||
| opencode.ts | ||
| slate.ts | ||