深入拆解Claude Code的记忆管理机制
用过Claude Code的开发者可能都有这样的体验:即便在一次超长对话中修改了几十个文件,它似乎始终"记得"之前做过什么。更神奇的是,你在上一次对话里告诉它"我喜欢用bun而不是npm",下次它就自动遵守了。
这背后是一套精密的记忆管理系统。今天,我们把Claude Code的记忆机制彻底拆解开来。
用过Claude Code的开发者可能都有这样的体验:即便在一次超长对话中修改了几十个文件,它似乎始终"记得"之前做过什么。更神奇的是,你在上一次对话里告诉它"我喜欢用bun而不是npm",下次它就自动遵守了。
这背后是一套精密的记忆管理系统。今天,我们把Claude Code的记忆机制彻底拆解开来。
I haven't updated my blog in over a year. Not out of laziness, nor because I've fallen behind on technology. It's more of a conviction: once AI became powerful enough, the value of technical blogs dropped significantly. People shifted from searching and reading to learning through direct conversations with AI. On top of that, AI-generated content floods social media the moment anything happens, making me feel there's little point in writing after the fact. Blog traffic has plummeted over the past year, which further killed my motivation to spend hours crafting a post. I miss the days when every article was painstakingly typed out, word by word, over hours or even days.
AI tools have made remarkable progress in the past six months. As a heavy user, I want to talk about this: if agents are supposed to be our helpers, why do we feel more exhausted than ever?
公众号一年多没更新了,不是因为懒,也不是因为自己没有跟上技术的步伐,而是因为有个执念,AI变强之后,技术博客本身的价值就大幅降低,大家学习的方式已经从搜索-学习变成了直接与AI对话的交互式学习。此外由于AI能力的加持,太多AI生成的公众号内容会第一时间发布一些内容,让我觉得步人后尘倒也没有太大必要。从博客的访问量上来看,最近一年的访问量也骤跌,更没有了花几小时写一篇文章的兴致。我更怀念那些一个字一个字几个小时甚至几天码出来的一篇博文的时光。
最近半年AI工具有了长足进步,作为重度用户,聊聊”明明Agent是我们的帮手,为什么却感觉越来越累?”
当你在 Windows 上使用 TeX Live 编译包含自定义字体的 LaTeX 文档时,可能会遇到如下错误:
kpathsea: Running mktextfm Fontin
The command name is F:\texlive\2025\bin\windows\mktextfm
name = Fontin, rootname = Fontin, pointsize =
mktexmf: empty or non-existent rootfile!
kpathsea: Running mktexmf Fontin.mf
The command name is F:\texlive\2025\bin\windows\mktexmf
Cannot find Fontin.mf.
kpathsea: Appending font creation commands to missfont.log.
kpathsea: Running mktextfm Fontin
The command name is F:\texlive\2025\bin\windows\mktextfm
name = Fontin, rootname = Fontin, pointsize =
mktexmf: empty or non-existent rootfile!
kpathsea: Running mktexmf Fontin.mf
The command name is F:\texlive\2025\bin\windows\mktexmf
Cannot find Fontin.mf.
这个错误的原因是 TeX 系统找不到所需的字体文件(特别是
.mf 或 .tfm
文件),因此无法生成它们。奇怪的是,你可能已经安装了该字体。
When compiling a LaTeX document that uses a customized font in TeX Live on Windows, you might encounter the following error:
kpathsea: Running mktextfm Fontin
The command name is F:\texlive\2025\bin\windows\mktextfm
name = Fontin, rootname = Fontin, pointsize =
mktexmf: empty or non-existent rootfile!
kpathsea: Running mktexmf Fontin.mf
The command name is F:\texlive\2025\bin\windows\mktexmf
Cannot find Fontin.mf.
kpathsea: Appending font creation commands to missfont.log.
kpathsea: Running mktextfm Fontin
The command name is F:\texlive\2025\bin\windows\mktextfm
name = Fontin, rootname = Fontin, pointsize =
mktexmf: empty or non-existent rootfile!
kpathsea: Running mktexmf Fontin.mf
The command name is F:\texlive\2025\bin\windows\mktexmf
Cannot find Fontin.mf.
This error occurs because the TeX system cannot find the necessary
font files (specifically .mf or .tfm files)
for Fontin, and fails to generate them. The weird part is that you have
installed the font already.
MongoDB's Aggregation Pipeline is a powerful tool for processing and analyzing data, suitable for both real-time queries and offline data analysis. It allows developers to use multiple stages to transform, filter, group, and sort data, enabling efficient execution of complex computations. This article will explore the basic concepts, application examples, performance analysis, and optimization strategies of the Aggregation Pipeline.
MongoDB 的 Aggregation Pipeline 是处理和分析数据的强大工具,适用于实时查询和离线数据分析。它允许开发者使用多个阶段(stages)来转换、过滤、分组和排序数据,从而高效地执行复杂的计算。本文将探讨 Aggregation Pipeline 的基本概念、应用示例、性能分析及优化方案。
Today, when I opened Chrome, I suddenly received a prompt saying that SwitchyOmega "# This extension may soon no longer be supported because it doesn't follow best practices for Chrome extensions." It seems that the plugin was disabled after Chrome automatically updated. Another bad news: the Stylish plugin has also been rendered unusable for the same reason.
Moreover, the Chrome Web Store is inaccessible, preventing the installation of other extensions—deadlock.
今天打开Chrome突然提示SwitchyOmega “此扩展程序未遵循 Chrome 扩展程序的最佳实践,因此已无法再使用。” 应该是Chrome自动升级之后插件被禁用了。还有一个坏消息,Stylish插件也因为一样的问题入土不可再用。
然后Chrome Web Store无法打开安装其他插件,死锁了。
The double-spending problem is a critical challenge in transaction systems, especially when managing account balances or funds. It occurs when a system allows the same funds to be spent multiple times due to concurrent operations or race conditions. In this article, we explore two approaches to resolving this issue using MongoDB: transaction-based handling and versioning-based handling.
This post is an in-depth discussion of the double-spending problem from the Building a Transaction System with MongoDB blog.