Posts

Showing posts from February, 2026

How Claude Code Works - Harness, Context, and Memory Explained

Image
How Claude Code Works - Harness, Context, and Memory Explained Before We Begin Summary What Is Claude Code? AI Model: Inference Harness: The System That Wraps the AI Model to Make It Work AI Agent: AI Model + Harness Claude Code Is an Agentic Harness How Does Claude Code Work? (Agentic Loop) Components of Claude Code (Harness) Session What Is a Session? When a Session Starts Checking the Session ID Where Is Session Context Stored? Restoring a Previous Session Context What Is Context? Types of Context Context Window (Size) Memory CLAUDE.md Auto Memory Context Reset (/clear) Context Compaction References image reference: ChatGPT This post is written for users who have used Claude Code a few times. It may be overwhelming for first-time users. Surprisingly, over 60% of this post was written by Claude Code itself. While using Claude Code, I kept wondering, “How does this thing actually work internally?” I figured that understanding the internals wo...