Question 270
A pre-tool hook rejects writes outside the repository but an unrelated preview command should still execute. What evidence or diagnostic detail should the engineer inspect FIRST?
Explanation
Correct Answer
Inspect hook event type, exit codes, execution order, failure handling and independent policy enforcement. Deterministic hooks are reliable for guardrails only when placed on the relevant execution path with fail-closed semantics. The appropriate response is: Use deterministic lifecycle hooks for mandatory logging, validation and policy checks instead of relying on a prompt asking the model to remember them. Situation: A pre-tool hook rejects writes outside the repository but an unrelated preview command should still execute.
Incorrect Answers
Inspect available tool registrations, session identifiers, permissions, turn events, and tool-result provenance. This evidence is useful for Claude Agent SDK session and tool boundaries but would not isolate the primary failure in this scenario. The decisive check is: Inspect hook event type, exit codes, execution order, failure handling and independent policy enforcement. Situation: A pre-tool hook rejects writes outside the repository but an unrelated preview command should still execute.
Inspect remaining budget, repeated action signatures, tool outcomes, success predicates, and escalation events. This evidence is useful for Agent state and stopping criteria but would not isolate the primary failure in this scenario. The decisive check is: Inspect hook event type, exit codes, execution order, failure handling and independent policy enforcement. Situation: A pre-tool hook rejects writes outside the repository but an unrelated preview command should still execute.
Review task boundaries, specialist access permissions, handoff records, output contracts, and escalation logic. This evidence is useful for Manager and specialist subagent task routing but would not isolate the primary failure in this scenario. The decisive check is: Inspect hook event type, exit codes, execution order, failure handling and independent policy enforcement. Situation: A pre-tool hook rejects writes outside the repository but an unrelated preview command should still execute.

