claude-memory/graph/solutions/fixed-posttooluse-hook-context-injection-ba1890.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

784 B

id type title tags importance confidence created updated
ba189013-3890-4464-a22d-cdc3d68d8068 solution Fixed PostToolUse hook context injection
claude-code
hooks
pai
fix
memorygraph
0.8 0.8 2025-12-07T07:26:28.700934+00:00 2025-12-07T07:32:04.922535+00:00

PostToolUse hooks cannot inject stdout directly into Claude context - only SessionStart and UserPromptSubmit can. The fix is to use JSON output with additionalContext field: {hookSpecificOutput: {hookEventName: 'PostToolUse', additionalContext: 'your message'}}. Also discovered tool_response (not tool_output) is the correct field name, and exitCode doesn't exist - must infer success from stdout patterns. Full reference: https://notes.manticorum.com/reference/claude-code-hooks-context-injection