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

推荐订阅源

Cyberwarzone
Cyberwarzone
G
Google Developers Blog
T
The Blog of Author Tim Ferriss
U
Unit 42
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
I
InfoQ
AI
AI
Webroot Blog
Webroot Blog
Forbes - Security
Forbes - Security
The GitHub Blog
The GitHub Blog
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
大猫的无限游戏
大猫的无限游戏
Cisco Talos Blog
Cisco Talos Blog
V2EX - 技术
V2EX - 技术
博客园_首页
S
SegmentFault 最新的问题
H
Help Net Security
A
About on SuperTechFans
Project Zero
Project Zero
Recent Commits to openclaw:main
Recent Commits to openclaw:main
爱范儿
爱范儿
Jina AI
Jina AI
H
Hacker News: Front Page
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
IT之家
IT之家
博客园 - 【当耐特】
腾讯CDC
博客园 - 聂微东
Latest news
Latest news
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
S
Schneier on Security
Spread Privacy
Spread Privacy
博客园 - 三生石上(FineUI控件)
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
O
OpenAI News
Help Net Security
Help Net Security

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
The Zero-Budget AI Memory System That Survives Session Resets No database. No framework. Just files, startup order, correction logs, and discipline.
Self-Correct · 2026-05-25 · via DEV Community

Most people building with AI agents hit the same wall eventually, and it has nothing to do with how smart the model is.

The wall is forgetting.

You spend an evening building something real with an AI: a system, a plan, a way of working that finally fits how your mind works. The next morning you open a fresh session and it is gone. Not the files. The understanding. The model that learned your shorthand yesterday meets you today like a stranger. You re-explain. It re-derives. You watch the same ground get covered again, and a little of the momentum dies each time.

There is a whole industry forming around this problem: vector stores, temporal knowledge graphs, managed agent-memory services, framework integrations measured in the dozens. Some of it is genuinely good engineering.

But before you buy infrastructure, learn the discipline.

You can solve a lot of the memory problem with plain files, clear startup order, and honest maintenance.

This is the basic setup behind my own AI memory workflow. In my case, that means plain markdown files on disk plus a structured mirror I can edit by hand. Your version could be a private repo, Obsidian vault, Notion page, local folder, or whatever you will actually maintain.

This is not the strongest possible memory system. It is the lowest-friction one I would trust.

The One Principle

Memory persists only to the degree you write it down.

The live conversation is the most fragile part of the system. It feels like the relationship, the context, the shared understanding. But it is RAM. It evaporates. Treating the conversation as durable memory is where the trouble starts.

The discipline is not "remember more." The discipline is "externalize what matters." Anything important has to move out of the volatile chat and into something that survives the session: a local file, a knowledge base, a repo, a project note.

This is not just note-taking. It is note-taking with a boot sequence, an honesty rule, a source-of-truth hierarchy, and a maintenance rhythm designed for an AI agent to read and act on.

Once you accept that, the patterns get simple.

Pattern 1: One Folder First, Two Mirrors Later

One memory folder is enough to start.

I use two mirrors because I work across multiple agents and tools:

  • a structured place I can read and edit by hand,
  • and plain text / markdown files that agents can read on startup.

By structured mirror, I mean a human-readable version of the same memory: a Notion page, Obsidian vault, project doc, or knowledge base where I can review the record without digging through raw files.

Why two? Because different agents do not always see the same world. One may see the knowledge base but not the disk. Another may see local files but not the external app. If memory exists in only one place, part of the system can go blind.

So important decisions, corrections, and current-state changes get mirrored.

It feels redundant. The redundancy is the point.

A single copy of memory is one outage away from amnesia. Two copies kept deliberately in sync can survive one tool, thread, or laptop failing.

But the second mirror is not required on day one. It becomes useful once one tool can see something another cannot.

The catch is drift. If the two mirrors disagree, you need a rule before the conflict happens. Mine is simple: the markdown memory files are the source of truth for agent startup. The structured mirror is for human readability and editing. If they disagree, the files win until deliberately updated.

Sync does not have to be fancy. A weekly review, a git commit, or even a short manual compare is enough at small scale. What matters is that the mirrors are not allowed to silently diverge.

My sync protocol is deliberately boring:

1. Update the markdown files first.
2. Mirror only the current state and major corrections into the human-readable place.
3. Once a week, compare state.md against the mirror and fix whichever one is stale.

Enter fullscreen mode Exit fullscreen mode

If you use git, commit after meaningful changes. If you do not, add dates inside the files. Either way, every important correction needs a timestamp and a way to mark it superseded later.

Pattern 2: Identity Loads First

When a fresh session starts, the order you load context matters more than the amount.

If the agent reads recent activity before it reads its role, mission, and rules, it behaves like a smart tool with no spine: competent, generic, untethered. If it reads identity first, then current state, then corrections, the same facts produce a more coherent agent.

My startup order is simple:

1. orientation.md — role, mission, rules
2. state.md — current truth
3. corrections.md — what changed and why
4. decisions.md — choices and rejected alternatives
5. gates.md — what would prove a belief/project wrong
6. open_questions.md — what should not be settled yet
7. session_log.md — what changed at the end of the last session

Enter fullscreen mode Exit fullscreen mode

The orientation file gives the session its frame. The rest supplies the working context.

Pattern 3: Make the Agent Doubt Its Own Memory

An agent with memory will, given the chance, fabricate memory.

Ask it what happened in a meeting it has no record of and a weak setup will invent a plausible answer. That behavior poisons everything, because now you cannot trust any of it.

So I use one rule everywhere:

If you did not read it, you do not know it. Say so.

Enter fullscreen mode Exit fullscreen mode

I do not have a record of that is a correct answer.

A confident invention is a failure even when it happens to be accidentally right, because it trains the system to bluff.

The test of a memory system is not how much it remembers. It is whether it tells the truth about what it does not know.

Pattern 4: Treat Context as a Budget

Long sessions feel productive, but they can become expensive and noisy. A lot of the context window gets spent re-reading old conversation every turn. The chat becomes a furnace that burns tokens just to keep itself warm.

The fix is unglamorous:

  • summarize and restart before the buffer bloats,
  • edit stale instructions instead of stacking corrections on top,
  • load only relevant memory files,
  • search the files before assuming the record is missing,
  • match the model to the task,
  • keep current state short and fresh.

The archive should reduce repeated setup cost over time, not become another giant prompt you drag everywhere.

At small scale, filenames, headings, tags, and search are usually enough. When you cannot find the relevant entry quickly, that is a signal to improve the index before adding more memory.

A simple index.md can look like this:

# Memory Index

## Active Projects
- api-latency — state.md, corrections.md#cache-miss, open_questions.md#prod-data-shape
- launch-site — state.md, decisions.md#pricing-page

## Active Corrections
- Cache miss was not the root cause — corrections.md#2026-05-23-cache-miss
- Do not summarize unresolved decisions as settled — corrections.md#2026-05-24-summary-collapse

## Open Questions Due For Review
- prod-data-shape — open_questions.md#prod-data-shape — review 2026-05-30

Enter fullscreen mode Exit fullscreen mode

And the search can be as simple as:

rg -n "cache|latency|prod-data-shape" memory/

Enter fullscreen mode Exit fullscreen mode

Pattern 5: Preserve Corrections, Not Just Wins

Most people save the clean output. That is useful, but it is not enough.

The more valuable record is often what changed:

  • what you believed,
  • what failed,
  • what got corrected,
  • what behavior should change next time.

That is why my basic setup includes corrections.md.

A useful correction entry looks like this:

## 2026-05-23 — Cache miss was not the root cause
Claim under correction: "The slowdown is probably caused by repeated cache misses."
What changed: Profiling showed the cache was fine; the bottleneck was an unbounded query.
Next behavior: Profile before changing cache policy.
Active gate: Do not touch caching until the query path is measured again.

Enter fullscreen mode Exit fullscreen mode

That kind of memory gives the agent standing to challenge you later.

Pattern 6: Preserve What Is Still Open

Corrections are not the whole system. Some things are not ready to resolve.

That is why I also keep open_questions.md: a place for unresolved questions, live interpretations, uncertainty boundaries, and review triggers.

Example:

Question: Is the performance issue algorithmic, or is it caused by production data shape?
Live interpretations:
1. Algorithm is too slow at scale.
2. Production data has an unexpected distribution.
3. The local benchmark is not representative.
Next evidence needed: Production trace plus one controlled benchmark.
Falsification: If production traces show constant-time behavior, stop blaming the algorithm and inspect data shape.
Review policy: If neither trace nor benchmark resolves it by Friday, keep the question open but stop changing code around assumptions.

Enter fullscreen mode Exit fullscreen mode

The goal is not to keep questions open forever. The goal is to stop weak summaries from killing live hypotheses before evidence arrives.

The Minimal File Set

If you want to start tonight, create one folder called memory and add:

orientation.md
state.md
corrections.md
decisions.md
gates.md
open_questions.md
index.md
session_log.md

Enter fullscreen mode Exit fullscreen mode

Then put this in your agent/project instructions:

At session start, read orientation.md first, then state.md.
Read only the correction, decision, gate, or open question relevant to the task.
If you did not read a file, do not claim you know it.
Separate what is known, inferred, contested, and missing.
After loading, tell me which files you read and what context you do not have.

Enter fullscreen mode Exit fullscreen mode

Use this conflict rule:

1. If a dated correction directly contradicts chat memory, the correction wins.
2. If state.md contradicts an old summary, state.md wins.
3. If decisions.md records a choice and rejected alternatives, do not reopen it unless new evidence is named.
4. If two files disagree, report the conflict instead of blending them.
5. If nothing was read, say "I do not have a record of that."

Enter fullscreen mode Exit fullscreen mode

That is enough to begin.

Not enough to build a perfect memory system. Enough to stop starting from zero.

If eight files feels like too much, start with three:

orientation.md
state.md
corrections.md

Enter fullscreen mode Exit fullscreen mode

Add decisions.md, gates.md, open_questions.md, index.md, and session_log.md once the project starts repeating itself.

A good startup response should sound like this:

Loaded:
- orientation.md
- state.md
- corrections.md

Current truth:
The API is deployed, but the latency regression has not been explained.

Relevant correction:
Cache miss was not the root cause.

Missing context:
I have not read decisions.md, gates.md, or open_questions.md yet, so I will not assume the query strategy is final.

Enter fullscreen mode Exit fullscreen mode

For multiple projects, do not mix everything into one undifferentiated folder. Either keep one memory folder per project or use clear project prefixes and tags in a shared folder. Shared memory without boundaries becomes noise fast.

Who This Is For

This setup is useful if your AI work lasts longer than one session: research, writing, coding, product decisions, client work, agent projects, or any thread where the cost of re-explaining context keeps compounding.

It is probably overkill for disposable prompts, quick lookups, or one-off tasks where forgetting does not matter.

The point is not to turn every chat into a bureaucracy. The point is to preserve the parts of your work that would be expensive, risky, or annoying to reconstruct later.

What Can Still Go Wrong

Plain files do not magically create good memory. They just make memory inspectable.

The system still fails if:

  • the files are stale,
  • the startup order is ignored,
  • the two mirrors drift without a source-of-truth rule,
  • every small thought gets saved,
  • corrections are never reviewed,
  • old state survives after the project has changed,
  • the agent treats missing records as permission to invent.

The maintenance is the system. Without it, the folder becomes another archive no one trusts.

There is also a scaling limit. Plain files are excellent for a solo operator, a small team, or roughly 8 to 12 active projects with a few hundred entries. Once you have many contributors, heavy retrieval needs, long autonomous runs, regulated audit requirements, or thousands of memory entries, infrastructure starts earning its place. For collaborative RAG, permissioned team memory, or high-volume ingestion, files may be inferior from day one.

Weekly Maintenance

Once a week, spend 15 minutes keeping the memory alive:

  • update state.md to what is currently true,
  • append a short session_log.md summary if the last session changed direction,
  • mark stale corrections as superseded instead of deleting them,
  • archive old open questions that no longer affect decisions,
  • check whether the structured mirror and markdown files still agree.

You can measure whether it is working with three simple numbers:

  • how often you have to re-explain the same project context,
  • how often the agent catches a repeated mistake because the correction was already written down.
  • how many tokens or paragraphs you avoid pasting because targeted loading found the right file.

If those numbers are not improving, the system is not memory. It is storage.

Why Discipline Beats Infrastructure First

I am not against memory tools. Once a system grows, real infrastructure can earn its place: retrieval filters, vector stores, metadata, review automation, temporal memory layers.

But tools solve storage. They do not solve judgment.

A vector database full of unverified, uncorrected, identity-less memories is just a faster way to be confidently wrong.

Get the discipline right with files first.

Then earn the right to automate it.

Where This Leads

Once the basic setup works, the deeper layers are:

  • Correction memory: preserve where your thinking changed and why.
  • Unresolved memory: preserve what should not be settled yet.
  • Source-of-truth hierarchy: decide which record wins when memories conflict.

Most AI memory advice starts with infrastructure.

I would start with the operating discipline:

What should persist?
What should be corrected?
What should stay unresolved?
What source wins?
What should the agent refuse to invent?

Enter fullscreen mode Exit fullscreen mode

That is the difference between an AI that remembers you and an AI that can actually work with your judgment over time.

Answer those questions, and the next session stops beginning from zero. The agent no longer meets you like a stranger every morning. It meets the record first.

Memory is not what the agent claims to know. Memory is what the record can still prove.