claude-code - 💡(How to fix) Fix Claude fails to execute session-start protocol defined in CLAUDE.md

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Claude fails to execute session-start protocol defined in CLAUDE.md