Skip to content

Build1 publisher3 min readPublished

Three CLAUDE.md locations ship about 1,600 tokens each on a session's first request

A codeword test on Claude Code v2.1.273 put six same-sized memory files in six places. Three arrived at launch, two waited for a Read below them, and one needed an environment variable to arrive at all.

The Engineer · Build desk

Illustration accompanying Three CLAUDE.md locations ship about 1,600 tokens each on a session's first request

What happened

  • A codeword test put six same-sized CLAUDE.md files around one repo, and the parent, working-directory and CLAUDE.local.md copies all arrived in the first request at about 1,600 tokens each.
  • The two files sitting in subdirectories below the working directory cost zero tokens until Claude read a file inside those directories.
  • Two runs of one configuration came in 786 input tokens apart because only one of them carried a remote connector's deferred tool list.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • cost A repo that keeps rules in all three launch locations opens every session roughly 4,800 tokens down, and pays that on runs that never touch the code those rules describe.
  • decision Whether a rule always applies becomes a directory choice: at or above the working directory to guarantee delivery, inside a package to bill only when that package is opened.
  • constraint Teams stitching sibling trees in with --add-dir do not get those trees' conventions by default, so cross-tree rules need the environment variable or a copy in a location that loads.
  • capability Per-request usage and attachment records in the session transcripts let any team measure its own memory bill, provided MCP config and hooks are pinned for the run.

The filler is what makes the numbers readable. Each of the six memory files is a heading, one line naming its codeword, and forty lines that ask for nothing, so every file lands between 4,543 and 4,669 bytes [7]. Identical size means a difference in first-request input points at where a file was loaded, not at how long it is [8].

That also gives a conversion rate. About 1,600 tokens for roughly 4,600 bytes works out to 2.8 to 2.9 bytes per token, or near 350 tokens per kilobyte of plain markdown [4]. For the 1,600 to transfer to your repo, your CLAUDE.md has to be about that size and tokenize about the same way; a 12 KB rules file at the same ratio would cost on the order of 4,200 tokens [7]. Three populated launch locations at 1,600 each is about 4,800 tokens of instructions before the model reads the prompt [1].

The delivery is visible in the transcript. Launch memory arrives as one attachment of type `instructions` with a `files` list, each entry carrying a path, a type, and the file content [19]. The memory page of the docs says "CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded at launch. Files in subdirectories load on demand when Claude reads files in those directories" [4]. The observed order was filesystem root down to the working directory, with CLAUDE.local.md appended after the CLAUDE.md in the same directory [20].

An added directory does not behave like a subdirectory. For paths passed with `--add-dir`, the docs say "By default, CLAUDE.md files from these directories are not loaded" [5]. In the test that file stayed out even after a Read inside the directory, and one environment variable brought it in; the post does not name the variable [3].

Getting numbers that repeat took work. Two runs of the same configuration returned 23,624 and 24,410 input tokens, and the only transcript difference was a remote connector's deferred tool list [11]. The authors write that they assume a timing race while the connector starts, and that they did not confirm it [12]. The swing is 786 tokens, about half the cost of one memory file [2][3]. Noise that size makes a single file's arrival hard to attribute, so they pinned MCP with `--strict-mcp-config`, documented as "Only use MCP servers from --mcp-config, ignoring all other MCP configurations" [13], and disabled hooks per run with the override the hooks docs name [16]. The first ten runs were thrown away and 28 kept [15]. Hooks came off for a second reason as well: their own settings fire a notification on every stop, and 38 runs is 38 notifications [17][6].

A rule that has to hold on every request belongs at or above the working directory, where it is loaded at launch and charged on the first request [4][1]. A rule about one package can sit in that package, where it costs nothing until the model reads a file there [2]. These figures are one build deep: Claude Code v2.1.273, measured 2026-09-16 in a directory made with `mktemp -d` [6].

What to watch

  • Whether the environment variable that loads --add-dir memory gets documented, renamed, or turned on by default in a later CLI release.
  • Whether the deferred tool list variance is confirmed as a connector start-up race, which the authors did not establish.
  • The remaining configuration rows: whether a subdirectory file's later arrival is billed as a cache write or as fresh uncached input.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories