CCARF Practice Question
Correct answer: D
A: Relying on the model to correctly interpret heterogeneous formats is unreliable. The model may confuse DD/MM/YYYY with MM/DD/YYYY or miscalculate Unix timestamps. Data normalisation should happen deterministically, not probabilistically.
B: While ideal, modifying three separate backend systems is often impractical and outside the agent architect's control. The Agent SDK provides PostToolUse hooks precisely for normalising heterogeneous outputs without modifying upstream systems.
C: PreToolUse hooks intercept outgoing calls before execution, not incoming results. Date normalisation needs to happen on tool results after execution. The correct hook type is PostToolUse, not PreToolUse.
D: PostToolUse hooks intercept tool results after execution but before the model processes them. Converting all dates to a consistent ISO 8601 format ensures the model receives clean, unambiguous data regardless of which backend system produced it. This is the canonical use case for PostToolUse hooks.