← Mon, Nov 9 digest

Ask HN: How do you manage your AI agents' context across clients and projects?

hn thread ↗

A developer asks how to manage AI agent context across multiple clients, sparking a flood of shared workflows using local markdown files, wikis, and custom scripts.

read it The comment thread is packed with practical, concrete workflows, custom scripts, and lightweight directory structures shared by developers tackling agent context fragmentation.

summary

An engineer asks the Hacker News community how they preserve state, handle multi-client boundaries, and avoid context loss when working with AI coding agents. Commenters overwhelmingly recommend lightweight, file-based solutions—such as Obsidian vaults, structured markdown files, and automated handoff scripts—rather than complex dedicated platforms. Many share custom-built open-source tools and harness patterns that force agents to write session summaries and decision logs before wrapping up.

key points

  1. Lightweight markdown files and project-specific knowledge bases are the most popular approach for maintaining persistent agent memory across sessions.
  2. Several developers enforce context updates using custom gatekeeper scripts that block session completion until the agent documents findings in a local wiki.
  3. Isolating clients is typically handled via separate directory structures, repositories, or local user accounts rather than complex cloud platforms.

who should read it

Software engineers and power users who heavily rely on coding agents and need practical strategies to prevent context drift and memory loss across projects.

discussion positive

consensus

Commenters largely agree that simple, file-backed systems outperform heavy external tools, with many emphasizing custom scripts to force agents to maintain their own documentation.

pushback

A minority point out that LLMs struggle with self-reflection and cannot reliably trigger themselves to write to logs at the right moment without strict programmatic enforcement.

best comment by mapontosevenths ↗

Karpathys LLM wiki with QMD.

I have a small gatekeeper.py script the agent has to run to complete a round or begin a new one. One of the things it does (in addition to record keeping, linting, etc) is validate that the wiki has been updated with all the findings, lessons learned, and documentation for the round. The agent can't proceed until it's done.

Then in the AGENTS.md they're told they can use QMD to perform semantic search of the wiki , and should before starting any significant work.

It's expensive, in terms of tokens, but well worth it. I could reproduce any stage of my project if …

It introduces a concrete programmatic pattern—a gatekeeper script that blocks session termination until the agent updates its persistent wiki.

Generated by an LLM from the article and thread. Check the sources before relying on it.