← All problems
AI agents Observed November 23, 2026

Agent sessions can start without referenced project instructions

Two Claude Code users reported sessions missing instructions referenced from CLAUDE.md: punctuation made one import unresolved, while an uninitialized submodule left another absent in a new desktop worktree. Neither case surfaced a useful warning before the session began.

What someone actually noticed

One user found that CLAUDE.md references immediately followed by a colon or comma were silently skipped. Their marker-file reproduction showed that references followed by whitespace or a line end loaded, while the punctuated ones did not. A maintainer reproduced the behavior and explained that the import path extends to the next whitespace; a later commenter reported the same failure with a trailing period. The issue was open when observed, but this does not establish behavior in every future release.

A different user reported that a fresh Claude desktop session worktree did not initialize a Git submodule containing imported instructions and project hook scripts. Their comparison found the first desktop session missing that content while the CLI worktree path loaded it. The issue was closed as inactive, not documented as fixed; it does not establish that current desktop versions still behave this way. The shared problem is a session beginning without a referenced instruction file, not one shared root cause.

Read the original signal: Claude Code GitHub issue, reproduction and maintainer follow-up on punctuation in imports

Ways to solve it

Without new software, put each required import on its own line, inspect the client's loaded-context view, initialize submodules before starting a fresh worktree session, and verify any required hook separately. Keep a short human checklist for important runs.

If omissions keep recurring, prototype a local readiness check for the repository's declared imports. Compare its warnings with an actual fresh session, and leave worktree initialization and import parsing fixes to the client maintainers.

A small app you could build

Agent Instruction Readiness Check

Try a local pre-session check that inventories referenced instruction files and verifies a fresh session can see a harmless marker before consequential agent work begins.

Who might use it: Teams using imported agent instructions in repositories or worktrees

  1. List intended instruction-file references and check whether their targets exist in the actual worktree
  2. Flag punctuation-adjacent references and empty submodule paths for human review
  3. Optionally ask a fresh supported agent session to report a nonsecret marker from each required file
  4. Stop the dependent task and show which import needs repair without copying instruction contents or credentials

What to verify before building

  • Reproduce the punctuation case on a current Claude Code release and confirm the documented whitespace workaround still applies.
  • Retest a desktop-created worktree with a pinned submodule and compare its first session with the current CLI worktree path.
  • Ask maintainers whether the client's own context view or startup diagnostics already reveal every required missing import.
  • Test false positives for ordinary at-mentions and false negatives for nested imports before proposing any automated block.

Reality check

These are two reports about one client with different causes, not a prevalence estimate or proof of willingness to pay. A static scanner cannot perfectly emulate the client's import parser, and a marker response may be unreliable evidence of full instruction loading. Upstream fixes, clearer diagnostics, or a simple manual check may remove the need for a separate tool. The closed worktree issue requires retesting on a current desktop release; never treat a passed check as proof that all hooks or safety controls ran.

An observation is not market validation. Check other reports and talk to the people who experience this before committing more than a tiny experiment.