The primary challenge for professionals working with AI agents is the significant time cost of re-explaining context, past decisions, and client-specific rules for every new session. To solve this, users are developing custom architectures that treat agent memory as a persistent, structured asset rather than a transient conversation.
The Problem of Context Drift
The original poster on Hacker News describes a workflow where the major time cost involves re-explaining context and past decisions to AI agents across several clients. They are exploring whether to build a tool to solve this, specifically seeking ways to handle context from various sources like chats, emails, and tickets.
Commenters on Hacker News noted that many have already built similar tools to address these issues. The goal is to ensure that an agent's 'memory' persists across sessions so that the user does not have to repeat instructions that were already established in previous work.
“The major time cost for me is to re-explaining context and past decisions, client rules, that we already do.”
— Ask HN: How do you manage your AI agents' context across clients and projects?
Persistent Storage and Shared Memory
Several commenters suggested moving context into structured files or databases. One user proposed using the Open Knowledge Format (OKF) to log every transaction, allowing any AI model to read the history. Another approach involves using a local SQLite database to store metadata and a 'running topic.md' file that is updated at the end of every session to build a persistent context for specific topics.
Other methods include using version-controlled files, such as a gitignored Architecture Decision Record (ADR) directory or a status document to resume work. Some users utilize a 'Johnny.Decimal' system, where every part of a business has a well-defined ID linked to a Markdown note and a folder on disk, allowing the agent to access a human-readable 'shared memory' via a CLI.
Isolation and Multi-Client Architectures
A critical concern for professionals is preventing 'context pollution' where data from one client leaks into another. One commenter described a 'layer-cake' architecture where context is organized into root, agent, client, and project layers. The agent loads and concatenates instructions from these specific subtrees, ensuring that an agent working for 'Client A' cannot access the subtree for 'Client B'.
Other users manage isolation by pointing agents to specific 'exemplar' projects to learn styles or by using project-specific issue trackers. Some use a 'gatekeeper' script that validates whether a project wiki has been updated with new findings before the agent is allowed to begin a new round of work.
Trade-offs and Technical Constraints
While these methods improve consistency, they introduce trade-offs in cost and complexity. For example, using semantic search on a project wiki to ensure the agent never forgets important details can be expensive in terms of token usage. However, some users argue this cost is worth the benefit of being able to reproduce any stage of a project perfectly.
The discussion also highlighted technical friction, such as the limitations of terminal interfaces for agentic loops. Some users prefer running agents in Podman containers or using local webservers to manage multiple models (like Claude and Codex) simultaneously while staying within weekly usage caps.
