
Claude Code 2.1.288 Fixes Rule Loading on New Files
This episode covers a fix in Claude Code 2.1.288 that makes path-scoped rules and nested CLAUDE.md files load on Write and Edit, even when a file is created before any read. It also breaks down the new InstructionsLoaded hook details, rule-loading caveats, and a handful of smaller workflow updates in the release.
Chapter 1
Path Scoped Rules Now Load on Write and Edit
Lachlan Reed
Quick question before we start. Have you ever asked Claude to scaffold a new file, and it ignored every rule you wrote for that folder? This episode of The Claude Code Changelog is brought to you by Jellypod AI, and today's release is a fix for exactly that.
James Turner
Right, version 2.1.288, shipped October 2. Yesterday's 2.1.287 was the mods release. This one is about context reliability. Path scoped rules in dot claude slash rules, and nested CLAUDE.md files in subdirectories, now load when Claude uses Write or Edit on a file in their scope. Before this, only Read triggered them.
Lachlan Reed
So here's the gap. You ask Claude to create src/api/auth.ts. It calls Write straight away, with no Read first, because the file doesn't exist yet. The rule that says all handlers validate input never loaded. The code comes out blind to your standards. Same story if an edit lands without a Read beforehand.
James Turner
And the official memory docs already said path scoped rules trigger on Read, Write, or Edit. The changelog entry is a bug fix, so the behavior now matches that description. It matters most for subagents and automated flows, which often touch files without reading them first.
Lachlan Reed
Here's a setup you can try today. In dot claude slash rules, make a file called api dot md. Frontmatter with a paths list: src slash api, double star, slash star dot ts, and services, double star, slash star dot ts. Below that, plain rules. Endpoints return ApiResponse of T. Validate input with Zod before processing. No direct imports from db slash internal.
James Turner
Or skip the rules folder and drop a CLAUDE.md inside a package, like packages slash database. Same idea, it loads when Claude touches files in that directory. To test it, start a fresh session, ask Claude to create a new file under src slash api, then run slash context and check the Memory files list. The rule should be there now, even though nothing was read.
Lachlan Reed
There's also the InstructionsLoaded hook. In 2.1.288 it now includes agent_id and agent_type when a subagent's file access loads a rule or nested CLAUDE.md. Rules loaded on file access also report effort. So if you log that hook, you can see which agent pulled in which instruction.
James Turner
Now the caveats. Users in a GitHub issue thread reported that once a path scoped rule loads, it stays for the rest of the session, even after Claude moves elsewhere. That's user testing, not official documentation, but plan around it. If one prompt scaffolds backend, frontend, and database folders, I'd expect several rule files to load together and your input tokens to jump. That part is my inference.
Lachlan Reed
And one from the docs. A rule's paths list shares a budget of 1,000 expanded patterns and 4 MiB. Go over it, and Claude Code uses the pattern unexpanded, so the literal braces match no files. Keep brace expansion tidy and the rule keeps working.
James Turner
A few smaller things in this release. Press Up on an empty prompt after Ctrl+C and your cleared draft comes back, including pasted text and images. Slash code review takes a max findings flag, a number or all, and your choice sticks until you pass default.
Lachlan Reed
Background command time limits now apply only to unattended sessions: print mode, the Agent SDK, CI, and cloud. Terminal, desktop, and VS Code sessions have no limit. Behind a gateway that rejects structured outputs, there's a new env var, CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS. And in the agents view, Ctrl+F finds a session by name, and Alt plus the up or down arrow jumps between groups.
James Turner
If your rules felt flaky on new files, update, run slash context after a Write, and see what loaded.