grep found 0 matches for custom-theme in Claude Code's core, but 9 in a plugin
The author of a Claude Code teardown wrote that the string custom-theme does not appear anywhere in version 2.1.332, but searched only the main 402 MB binary. There the count is indeed 0, yet the separate theme-examples plugin, which has 43 files, contains it 9 times: 7 in README.md and one each in two other files. The zero was correct for one part of the release, while the conclusion was drawn for the whole. Before claiming that something is not in the code, specify exactly what you searched.
AI-processed from Habr AI; edited by Hamidun News
Imagine you search a project for a word with grep, get zero, and write in your report that it does not exist. It is actually sitting in a neighboring folder you never opened. That is exactly what happened to the author of a teardown of Claude Code's November updates.
In his fact-check he wrote that the literal custom-theme has no occurrences at all in the 2.1.332 release.
He has now corrected himself: in the main binary, which he examined byte by byte (402,325,736 bytes), the word does indeed appear 0 times. But the release is not limited to that binary. In the separate theme-examples plugin, where 43 files total 1,389,817 bytes, custom-theme appears 9 times: 7 in README.
md and one each in .claude-plugin/plugin.json and hooks/register.
tsx. The zero was accurate, but the conclusion drawn from it was too broad.
What was counted and where the error occurred
The Claude Code CLI code lives in a native binary, which the author calls the core. The npm package @anthropic-ai/claude-code contains no CLI code: the unpacked package weighs 210,315 bytes, and the largest of its seven files, sdk-tools.d.ts, takes up 181,112 bytes. Searching the npm package for "what Claude Code contains" is therefore pointless.
The error lay in what the zero was attributed to. The measurement covered only the core, but the conclusion was made about the entire release, whose composition the author did not analyze. The theme-examples plugin ships separately; the author checked its file sizes against the GitHub API tree and verified five downloads file by file.
The zeros from the npm package also carry caveats. The re.findall check has no positive control, meaning no example that is guaranteed to match. Moreover, the script downloaded the archive by the latest tag and did not print the version, so those zeros cannot be tied to 2.1.332.
Why 0 does not mean "it doesn't exist"
The exact string custom-theme is absent from the core, but close spellings are present: customTheme 20 times, CustomTheme 30 times, custom_theme 2 times. These are not the same string in a different case. For example, 9 of the 20 occurrences of customTheme are part of the word customThemes, and one of them sits inside an error message.
The /ship command shows the reverse case. The string appears 275 times in the core, yet the registration form name:"ship" never appears. So the number of occurrences alone cannot tell you whether the command is registered. The substring ship appears 950 times: 275 after a slash and 675 without one.
The size of a list of names depends on the pattern. A strict regex finds 110 unique names following name:, and plugins is not among them, even though name:"plugins" does appear in the core: it is a tsconfig setting. A relaxed pattern yields 364 names, and dropping the alphabet restriction gives 1,283. The rise from 110 to 364 caused by removing a single description: condition cannot be explained by that condition alone: it adds 187 names out of 254 new ones. The author did not verify these figures against the CLI's own menu.
Nine cases where the shell prints the wrong number
The most practical part of the teardown is a table of nine cases reproduced in containers. Six causes produce false numbers:
- A suppressed failure: 2>/dev/null hides the error, and the exit code belongs to the last stage of the pipeline;
- The command never ran: a redirect into a file failed for lack of permissions, so the old value remained;
- The number does not come from the current input: the file holds data from a previous run;
- A shared input: the file was truncated between the size check and the grep run;
- The exit code of the last command: curl received a 404, but the pipeline returned 0 because wc -l printed 0 for an empty stream;
- A directory instead of a file: grep without -r prints "Is a directory", while the counter shows 0.
Another trap: grep -c counts lines containing a match, not the matches themselves. For the word ship it printed 437, while the pipeline grep -a -F -o | wc -l gave 950.
What to do in practice
The measurement recipe in the article runs as follows. First, confirm that the file exists and that its sha256 matches the pinned hash. Then search for each word with a separate grep that writes to its own file, check the exit code, and confirm that stderr is empty. Take the plugin at a pinned commit via the recursive GitHub API tree, and separately verify that the tree is not truncated.
The takeaway is simple. Before writing "this isn't in the product," define the boundaries of the object: the core, the plugins, the package. Confirm a zero with a positive control on a line that is certainly present. In scripts, check the exit code before parsing the output, and do not hide errors in /dev/null.
- Dec 2, 2026AI Agent Hunts for Load Bugs With and Without Code: 0.19M Tokens per Bug
- Dec 2, 2026Amazon Open-Sources Ergo Coding Model: 74.2% on DeepSWE, $3 per Million Tokens
- Dec 2, 2026Amazon Open-Sources Ergo, a 1.1T-Parameter Model Running at Up to 2,200 Tokens/s
- Dec 2, 2026A Coding Agent Without Cursor or Claude Code: Cline with DeepSeek Costs $21 a Month
Key Questions Answered
What was counted and where the error occurred?
The Claude Code CLI code lives in a native binary, which the author calls the core. The npm package @anthropic-ai/claude-code contains no CLI code: the unpacked package weighs 210,315 bytes, and the largest of its seven files, sdk-tools.d.ts, takes up 181,112 bytes. Searching the npm package for "what Claude Code contains" is therefore pointless. The error lay in what the zero was attributed to.
Why 0 does not mean "it doesn't exist"?
The exact string custom-theme is absent from the core, but close spellings are present: customTheme 20 times, CustomTheme 30 times, custom_theme 2 times. These are not the same string in a different case. For example, 9 of the 20 occurrences of customTheme are part of the word customThemes, and one of them sits inside an error message. The /ship command shows the reverse case. The string appears 275 times in the core, yet the registration form name:"ship" never appears.
What are the key details on Nine cases where the shell prints the wrong number?
The most practical part of the teardown is a table of nine cases reproduced in containers. Six causes produce false numbers: A suppressed failure: 2>/dev/null hides the error, and the exit code belongs to the last stage of the pipeline; The command never ran: a redirect into a file failed for lack of permissions, so the old value remained; The number does not come from the current input: the file holds data from a previous run; A shared input: the file was truncated between the size check and…
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
