In Claude Code 2.1.310, a CLAUDE.md modified within a session reverts to its old content after auto-summarization, while the model still follows the new rules
会话中修改的CLAUDE.md在自动摘要后恢复旧内容(2.1.310),但仍遵循新规则
The author ran controlled tests on Claude Code 2.1.310 and 2.1.311 and found that 2.1.310, after triggering auto-summarization mid-session, reverts CLAUDE.md to its content before the modification, while 2.1.311 has fixed this. In 2.1.310, all 29 cases where summarization was triggered while reading a file reverted to the old content; in 2.1.311, all 27 cases showed the new content. In both versions Claude followed the new rules; the author examined the summary text and found that all 63 summaries contained the new passphrase, and believes the update in the summary takes precedence over the reverted file content. A CLAUDE.md modified with an editor takes effect from the next message, differing from the official documentation's statement that in-session modifications do not take effect.