You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk init: Claude CLAUDE.md status does not follow what Claude Code imports #5344
rtk init -g and rtk init --show decide whether ~/.claude/CLAUDE.md already loads RTK.md with content.contains("@RTK.md") (src/hooks/init/claude.rspatch_claude_md, src/hooks/init/mod.rsshow_claude_config). Claude Code's own rule is narrower. Measured with Claude Code 2.1.332 against a local Messages API stand-in (isolated CLAUDE_CONFIG_DIR with an RTK.md holding a canary string, checking whether the canary reaches the request):
CLAUDE.md contains
Claude Code imports RTK.md
rtk says
@RTK.md on its own line (also indented, CRLF, BOM-prefixed)
yes
configured
Read @RTK.md for details. / @RTK.md is my notes file. / - @RTK.md
On the last six rows rtk init -g adds no reference line, so RTK.md is never loaded, and --show prints [ok] Global (~/.claude/CLAUDE.md): @RTK.md reference. Claude Code deduplicates a repeated import, so adding a reference line when in doubt costs nothing.
Two reports nearby have the same shape:
rtk init -g always prints CLAUDE.md: @RTK.md reference added (claude.rs, after patch_claude_md), including when the reference was already there and nothing was written. The Codex summary already distinguishes added from already present.
rtk init -g --uninstall removes only a whole @RTK.md line, so an import install accepted (- @RTK.md) stays after RTK.md is deleted, and --show still prints [ok] for the uninstalled setup.
rtk init --show reports [ok] Local (./CLAUDE.md): rtk enabled for any ./CLAUDE.md containing the letters rtk (mod.rs, content.contains("rtk")), e.g. a file that mentions artkit.
A fix would match an @RTK.md token bounded by whitespace or the line edges, outside inline code and fenced blocks, for both the install check and --show, and report added only when a line was written. Removal on uninstall should stay whole-line only, so a user's sentence is never deleted.
Activity