feat: inject file observation timeline on PreToolUse Read hook
When Claude reads a file, the PreToolUse hook queries for existing observations about that file and injects the timeline into context via additionalContext + permissionDecision: allow. This prevents duplicate observations and saves tokens through active rediscovery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -15,7 +15,12 @@ export interface NormalizedHookInput {
|
||||
export interface HookResult {
|
||||
continue?: boolean;
|
||||
suppressOutput?: boolean;
|
||||
hookSpecificOutput?: { hookEventName: string; additionalContext: string };
|
||||
hookSpecificOutput?: {
|
||||
hookEventName: string;
|
||||
additionalContext: string;
|
||||
permissionDecision?: string;
|
||||
permissionDecisionReason?: string;
|
||||
};
|
||||
systemMessage?: string;
|
||||
exitCode?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user