↓ Skip to main content
  1. Tags/

AI Agent

2026

AI Memory Systems: Four Memory Types and Semantic Recall
Deep Thoughts · 2026-06-02 · 8 分钟

AI Memory Systems: Four Memory Types and Semantic Recall

Last time we covered context compaction — solving “how much the current session can remember”. But a coding assistant needs another kind of memory: long-term memory across sessions. You close Claude Code and reopen it tomorrow. What should it know? You prefer TypeScript over JavaScript You said last time “don’t use the underscore library” This project uses Vitest, not Jest You once corrected one of its misunderstandings Context compaction can’t handle these. The session ends, the history clears, tomorrow is a fresh window. If the AI needs you to re-explain everything each time, it isn’t an assistant — it’s a burden.

1560 字 阅读 ➔
The Physical Cost of Context Compression: KV Cache Pressure, Attention Decay, and Lossy Summarization
Deep Thoughts · 2026-05-23 · 9 分钟

The Physical Cost of Context Compression: KV Cache Pressure, Attention Decay, and Lossy Summarization

Large language models possess no biological memory at the hardware tier; they operate entirely on Key-Value Caches that scale linearly in GPU High-Bandwidth Memory (HBM) alongside attention weight distributions that mathematically dilute as sequence length grows. The notion of long-horizon conversations presented by Claude Code is, at its engineering core, an eviction and compaction pipeline operating within the tight margins of memory capacity and numerical precision, trading away information entropy and prefix caching efficiency.

1718 字 阅读 ➔
Permissions and Real Security Boundaries: Sandboxes, System Calls, and Approval Escape
Deep Thoughts · 2026-05-20 · 9 分钟

Permissions and Real Security Boundaries: Sandboxes, System Calls, and Approval Escape

Any AI agent permission system running in userspace that relies on model self-discipline and application-level regex filtering does not constitute an enforceable security boundary from the perspective of the operating system kernel. Claude Code’s 5-level permission model and interactive approval workflow operate as flow-control protocols to mitigate developer mistakes, lacking sandbox containment against adversarial attacks. Granting an AI coding assistant filesystem write access and terminal execution rights under the belief that confirmation prompts preserve a safety perimeter is a fundamental category error. Confusing interactive human approval with privileged access control collapses into a cosmetic barrier when confronted with supply-chain poisonings, indirect prompt injections, and shell parser differentials.

1736 字 阅读 ➔
System Prompt Engineering: Decisions Behind 800 Lines
Deep Thoughts · 2026-05-16 · 9 分钟

System Prompt Engineering: Decisions Behind 800 Lines

If you think a system prompt is just “giving the AI a persona”, Claude Code’s system prompt will upend that notion. It isn’t a few sentences. It’s a thousand-line template engine made of multiple layers, each responsible for something different: identity definition, behavioral constraints, tool documentation, project context, memory injection, skill loading. Some layers are static (identical every time); others are dynamic (injected in real time based on the project, the session, user preferences).

1760 字 阅读 ➔
Tools Are Capability: AI Agent Tool System Design Philosophy
Deep Thoughts · 2026-05-12 · 8 分钟

Tools Are Capability: AI Agent Tool System Design Philosophy

Last time we talked about the Think-Act-Observe loop — the skeleton of an AI coding assistant. A skeleton can’t work on its own; it needs muscle. In Claude Code, that muscle is tools. Without tools, the loop loses the Act between Think and Observe and degenerates into plain Q&A. With tools, the model can touch the real world: read your code, change your configs, run your tests.

1624 字 阅读 ➔
The Soul of an AI Coding Assistant: The Think-Act-Observe Loop
Deep Thoughts · 2026-05-07 · 8 分钟

The Soul of an AI Coding Assistant: The Think-Act-Observe Loop

If you dig through the Claude Code source, you will discover a counterintuitive fact: The core of the entire program is a while loop. Not a complex state machine, not an elaborate pipeline, not distributed coordination — just a plain while loop that does three things over and over: let the model think, let the model act, feed the results back. 1 2 3 4 5 6 7 8 9 while (user hasn't quit) { thinking = callLLM(conversation history + tool definitions) if (thinking.wants to call a tool) { result = executeTool(thinking.toolCall) conversationHistory.push(result) } else { output(thinking.reply) } } That’s it? The entire secret of an AI coding assistant lives in this loop?

1645 字 阅读 ➔
Reverse Engineering Claude Science: From 54 Tables to Modern TCM
AI Technology · 2026-02-20 · 7 分钟

Reverse Engineering Claude Science: From 54 Tables to Modern TCM

A 67 MB DMG installer, 164 MB unpacked, hiding Anthropic’s Claude Science (internal codename Operon). After reverse engineering it, I found 54 SQLite tables, a 9-layer security model, 30+ bioinformatics skills, and a complete AI agent platform for computational biology. On the other side is TCMSP, an AI-native Traditional Chinese Medicine systems pharmacology platform under active development. Looking at the two projects side by side, some design ideas are worth cross-referencing.

1311 字 阅读 ➔
TencentDB Agent Memory: Real Layered Memory for AI Agents
AI Technology · 2026-02-03 · 10 分钟

TencentDB Agent Memory: Real Layered Memory for AI Agents

Why AI Agents Need a Memory System # If you’ve spent serious time with AI agents, these scenarios will feel familiar: Re-explaining the project background, coding conventions, and output format preferences in every new session Halfway through a long task, the context fills up with tool logs and the agent starts “forgetting” earlier instructions Wanting the agent to learn your working habits, but having no way to do it except hand-writing a system prompt every time Memory isn’t about making the AI store everything — it’s about making sure humans never have to repeat themselves. That’s the core idea behind TencentDB Agent Memory.

1917 字 阅读 ➔

2025

Claude Skills Progressive Disclosure via MCP: Skill in Anywhere
Engineering Practice · 2025-12-26 · 9 分钟

Claude Skills Progressive Disclosure via MCP: Skill in Anywhere

Claude Code Skill in Anywhere Implementing Claude Skills’ Progressive Disclosure via MCP: Reusing Claude Code Skills Anywhere # — A feasible approach to capability encapsulation and dynamic context extension (technical proposal and verification) # Preface # Claude Skills introduced a remarkably advanced concept: encapsulating professional knowledge, process standards, and task methods into “skill packages” that load dynamically, only when a task actually needs them.

1877 字 阅读 ➔