Prioritized action plan · P0 = fix before running agents autonomously
4 recommendations total. P0 items are blockers for safe autonomous operation. Not sure where to start? Free AI Assessment helps map priorities to your specific setup.
~/.claude/settings.json hooks section:{
"PostToolUse": [{
"matcher": "Task",
"hooks": [{
"type": "command",
"command": "jq -r '[now | strftime("%Y-%m-%dT%H:%M:%SZ")] + " [AGENT] " + .tool_name' >> ~/.claude/agent-trace.log"
}]
}]
}
~/.claude/settings.json hooks section:{
"Stop": [{
"hooks": [{
"type": "command",
"command": "echo "$(date -Iseconds) session-end" >> ~/.claude/session-log.txt"
}]
}]
}
~/.claude/settings.json hooks section:{
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '"[FILE] " + (.tool_input.file_path // .tool_response.filePath // "unknown")' >> ~/.claude/file-changes.log"
}]
}]
}
~/.claude/settings.json hooks section:{
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '"[FILE] " + (.tool_input.file_path // .tool_response.filePath // "unknown")' >> ~/.claude/file-changes.log"
}]
}]
}
Add these to ~/.claude/settings.json. These Claude Code tools hooks
give you production-grade observability with zero runtime cost.
PostToolUse:Task
Records inputs, outputs, and tool calls for every spawned agent.
{
"PostToolUse": [{
"matcher": "Task",
"hooks": [{
"type": "command",
"command": "jq -r '[now | strftime("%Y-%m-%dT%H:%M:%SZ")] + " [AGENT] " + .tool_name' >> ~/.claude/agent-trace.log"
}]
}]
}
SessionStart
Primes context at session start (e.g., auto-recall relevant learnings from memory).
# See documentation
PostToolUse:Write|Edit
Records every file write and edit for change tracking and rollback.
{
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '"[FILE] " + (.tool_input.file_path // .tool_response.filePath // "unknown")' >> ~/.claude/file-changes.log"
}]
}]
}
PostToolUse:Bash
Logs all Bash commands executed for debugging and security review.
{
"PostToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "jq -r '"[CMD] " + .tool_input.command' >> ~/.claude/bash-log.txt"
}]
}]
}
AI consulting from Oaken AI covers agent architecture, observability hooks, rule design, and AI infrastructure — everything in this report, built for your specific stack.
See Projected Results → Book a Strategy Call