published fresh until

Claude Code: keep project rules and memory concise

Summary As of November 2026, keep team instructions in CLAUDE.md, scoped rules in .claude/rules/, and learned notes behind MEMORY.md. Target under 200 lines per CLAUDE.md file; memory startup reads stop at 200 lines or 25KB, whichever comes first. Generate initial instructions with /init.

Not for Codex AGENTS.md configuration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Run /init, then refine the generated CLAUDE.md.

Short answer

Keep maintained rules separate from learned notes. Use conditional rules for file-specific guidance.

What to do

ItemValue / action
Team rules./CLAUDE.md or ./.claude/CLAUDE.md; target under 200 lines per file.
Inspect/context all lists loaded files.
Personal project notesCLAUDE.local.md; add it to .gitignore.
Topic rulesPut .md files in .claude/rules/; discovery is recursive.
Conditional rulesSet YAML paths, for example src/api/**/*.ts; rules without this field load at launch.
Imports@path/to/import; resolve relative to the importing file; maximum depth four hops.
Memory indexMEMORY.md: first 200 lines or 25KB, whichever comes first; topic files load on demand.
Memory switch/memory; autoMemoryEnabled defaults on locally; set false in project settings to disable.
Environment switchCLAUDE_CODE_DISABLE_AUTO_MEMORY=1 disables auto memory.
File ceilingStartup CLAUDE.md files over 4 MiB are skipped.

Limits and open questions

Auto memory is machine-local and shared across repository worktrees. Self-hosted sessions default to memory off outside Claude Tag. Instructions guide behavior; they do not enforce permissions.

Not for: Codex AGENTS.md configuration.

Sources

Checked

2026-11-16; read Claude Code memory documentation; no command was run.

Started from a post by @Anthropic Claude Code docs; Vladislav (DEV Community), packaged by the editor. Original post

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: keep project rules and memory concise
Summary: As of November 2026, keep team instructions in CLAUDE.md, scoped rules in .claude/rules/, and learned notes behind MEMORY.md. Target under 200 lines per CLAUDE.md file; memory startup reads stop at 200 lines or 25KB, whichever comes first. Generate initial instructions with `/init`.
Copy for agent
get the whatworks thread claude-code-organize-project-instructions-memory and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-organize-project-instructions-memory
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks