Claude fails to execute session-start protocol defined in CLAUDE.md
Bug Report
Model: Claude Sonnet 4.6 (claude-sonnet-4-6)
Environment: Claude Code VS Code extension
Description
When CLAUDE.md contains explicit session-start directives (e.g. 'call open_nodes on CurrentTask FIRST before responding'), Claude consistently fails to execute those tool calls at session start. It reads the instruction but does not act on it — instead it immediately responds to the user message, skipping the mandatory pre-response actions entirely.
This is a reproducible failure across multiple sessions. The instructions are visible in the system prompt, the tools are available and functional, but the action directives are not executed.
Impact
Users who rely on CLAUDE.md to enforce session initialization workflows (e.g. loading persistent memory, reading project state) cannot trust that these workflows will run. This breaks stateful workflows that depend on memory continuity across sessions.
Expected behavior
Action directives in CLAUDE.md marked as mandatory pre-response steps should be executed before Claude generates any response to the first user message.
Actual behavior
Claude reads the CLAUDE.md instructions and then responds to the user message without executing the specified tool calls. The tools are only called later in the session when the user explicitly asks or notices the failure.
Suggested fix
A hook mechanism that enforces pre-response tool calls defined in CLAUDE.md at the framework level, not relying on the model to voluntarily execute them.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗