[Bug] Claude Code ignores CLAUDE.local.md auto-execute configuration and prompts for pytest commands
Resolved 💬 5 comments Opened Sep 16, 2025 by BucklerCTO Closed Jan 5, 2026
[Bug] Claude Code ignores CLAUDE.local.md auto-execute configuration and prompts for pytest commands
Bug Description
Claude Code is requesting user confirmation for commands that are explicitly configured to auto-execute in CLAUDE.local.md, specifically pytest commands.
Expected Behavior
- Commands listed under "AUTO-EXECUTE COMMANDS" in
CLAUDE.local.mdshould run immediately without confirmation - Read-only test commands (pytest) should never require confirmation per user configuration
- Configuration should override default Claude Code behavior
Actual Behavior
- User is prompted to confirm:
cd .. && cd idd && python -m pytest backend/tests/integration/services/ -v --tb=short - This violates the explicit configuration rule: "NEVER wait for user approval for routine commands. Execute immediately."
- Command requires manual confirmation despite being marked for auto-execution
Configuration Details
User has configured in CLAUDE.local.md:
## CRITICAL RULE: EXECUTE COMMANDS IMMEDIATELY - NO INTERRUPTIONS
**AUTO-EXECUTE COMMANDS**:
- All testing and validation commands
- All code formatting and linting commands
Impact
- Breaks workflow automation
- Violates user's explicit configuration settings
- Causes unnecessary interruptions during development
- Inconsistent behavior between similar commands
Reproduction Steps
- Configure
CLAUDE.local.mdwith auto-execute rules for pytest commands - Run any pytest command through Claude Code
- Observe unnecessary confirmation prompt despite configuration
System Information
- Platform: macOS (Darwin 24.3.0)
- Claude Code: Latest version
- Working directory: Git repository with pytest configuration
Expected Fix
- Check command against auto-execute patterns before showing confirmation
- Implement proper pattern matching for configured auto-execute commands
- Add debug logging to show why a command required confirmation
- Honor user configuration over default Claude Code behavior
Labels
- bug
- has repro
- platform:macos
- area:core
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗