惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
S
SegmentFault 最新的问题
N
Netflix TechBlog - Medium
B
Blog
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 聂微东
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
U
Unit 42
J
Java Code Geeks
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Give Claude Code memory between sessions with three Markd...
igal · 2026-06-06 · via DEV Community

igal

Claude Code is brilliant inside a session and completely amnesiac between them. Close the terminal, come back tomorrow, and it has forgotten your architecture, your preferences, the bug you already solved, and the decision you made last week. So you spend the first ten minutes of every session re-explaining your project — and it still cheerfully suggests something you ruled out yesterday.

That cold-start tax adds up. Here's the small system I use to kill it. No plugin, no extension, no subscription — just three plain Markdown files and two habits.

The key insight

Claude Code automatically reads a file called CLAUDE.md at the start of every session. That's the whole hook. Instead of treating it as a static config file, treat it as a doorway: have it carry a short protocol that tells Claude to rebuild its own context before doing anything.

Split the context across three files by how often each changes:

  • CLAUDE.md — your standing rules + the session protocol. Read every session, so keep it short.
  • docs/JOURNAL.md — a chronological log of what's happened. Changes every session.
  • docs/KNOWLEDGE.md — durable facts, decisions, and gotchas. Rarely changes.

The protocol

The heart of it lives in CLAUDE.md:

## Session-start protocol (REQUIRED — do this before anything else)
1. Read docs/JOURNAL.md — the most recent entry is where we are.
2. Read docs/KNOWLEDGE.md — fundamentals, decisions, gotchas.
3. Greet me with current phase, last action, and the exact next step. Then wait.

## Session-end protocol (REQUIRED before we stop)
Append a journal entry: what we did / pitfalls hit / phase status / next steps.
Then commit.

With that in place, a session looks like this:

You open Claude Code. It reads the protocol, then the journal and knowledge base, and greets you with "current phase is X, last action was Y, next step is Z." No re-explaining.

You work. It already knows your stack, your style, and the decisions you've locked in — so it doesn't re-pitch the database you rejected last week.

You wrap up. It appends a journal entry — what you did, what tripped you up, and the exact next action — then commits. Tomorrow's session starts cold and is productive in under a minute.

Why a journal and a knowledge base?

Because they answer different questions. The journal is "what happened" (chronological, append-only). The knowledge base is "what's true" (reference, edited in place). The most valuable line in the journal is the next-steps block at the bottom of the latest entry — it's the handoff note to your future self, and it's what makes cold starts instant. The most valuable section in the knowledge base is the decision log, which stops settled questions from being re-litigated three weeks later.

Setup (about five minutes)

  1. Drop CLAUDE.md into your project root, next to where you run claude.
  2. Create docs/JOURNAL.md and docs/KNOWLEDGE.md (empty is fine to start).
  3. Fill in the project-specific blanks in CLAUDE.md: owner, goal, stack, repo map.
  4. Start your next session. It reads the protocol and asks what to work on.

The only habit you need is at the end of each session: "wrap up — append the journal entry and commit." That single habit is what makes every future session start fast.

It only gets more valuable the longer you run it: the journal deepens, your hard-won pitfalls stop repeating, and the knowledge base becomes the institutional memory of the project.

Grab the files

I put the core protocol and a ready-to-use CLAUDE.md up as a free, MIT-licensed repo:

👉 github.com/igal-in/claude-code-memory

That free file is the engine and works on its own. If you'd rather not build the journal and knowledge-base templates from scratch, I also packaged the complete system — both templates with the proven formats, a fully filled-in example project, and a short guide on adapting it — as the Claude Code Memory Kit ($12 on Gumroad).

How have you handled the cold-start problem with AI coding tools? Curious what's working for other people.