Skip to content
Tagged articles

PreToolUse

5 articles · Page 1 of 1
IT Architects Alliance
IT Architects Alliance
Oct 14, 2026 · Artificial Intelligence

Why Claude Code Still Runs npm After You Switched to pnpm: The Memory Invalidation Problem

This article analyzes why AI coding agents like Claude Code persistently execute outdated build commands despite updated rules, tracing how manual rules and automatic memory enter context, and proposes a governance framework with invalidation conditions, execution guards, and cross-session regression tests to keep memory aligned with current code.

AI agent memoryClaude CodePreToolUse
0 likes · 15 min read
Why Claude Code Still Runs npm After You Switched to pnpm: The Memory Invalidation Problem
IT Services Circle
IT Services Circle
Aug 29, 2026 · Artificial Intelligence

Preventing Claude Code from Running Dangerous Commands: Hook Strategies and CLAUDE.md

Claude Code can automate code edits, run commands, and modify files, but its powerful capabilities risk unintended actions; this article explains how to use Hooks—configurable event handlers such as Notification, PostToolUse, and PreToolUse—to enforce formatting, block risky commands, and require permission checks, ensuring safe and reliable AI‑assisted development.

Claude CodeNotificationPostToolUse
0 likes · 30 min read
Preventing Claude Code from Running Dangerous Commands: Hook Strategies and CLAUDE.md
Su San Talks Tech
Su San Talks Tech
Jun 16, 2026 · Artificial Intelligence

Mastering Claude Code Hooks and SDK: A Step‑by‑Step Guide

This article explains how Claude Code hooks work, walks through configuring PreToolUse and PostToolUse hooks, shows concrete JSON and Node.js examples for protecting sensitive files, automating type checks, preventing duplicate queries, and demonstrates how the Claude Code SDK can be integrated into larger AI‑driven development workflows.

AI automationClaude CodePostToolUse
0 likes · 20 min read
Mastering Claude Code Hooks and SDK: A Step‑by‑Step Guide
Java One
Java One
Mar 31, 2026 · Artificial Intelligence

Master Claude Code Hooks: PreToolUse & PostToolUse for Secure AI Workflows

This guide explains how to use Claude Code hooks—PreToolUse and PostToolUse—to run custom commands before or after tool execution, configure them in global or project settings, and implement practical examples such as blocking .env file access, type‑checking TypeScript, and preventing duplicate queries.

AI automationClaude CodePostToolUse
0 likes · 20 min read
Master Claude Code Hooks: PreToolUse & PostToolUse for Secure AI Workflows