<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[The First Principles]]></title><description><![CDATA[Engineering systems, products, and ideas from the ground up]]></description><link>https://blog.navneetsingh.name</link><image><url>https://blog.navneetsingh.name/img/substack.png</url><title>The First Principles</title><link>https://blog.navneetsingh.name</link></image><generator>Substack</generator><lastBuildDate>Wed, 27 May 2026 01:47:14 GMT</lastBuildDate><atom:link href="https://blog.navneetsingh.name/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Navneet Singh]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[navneetsinghlall@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[navneetsinghlall@substack.com]]></itunes:email><itunes:name><![CDATA[Navneet Singh]]></itunes:name></itunes:owner><itunes:author><![CDATA[Navneet Singh]]></itunes:author><googleplay:owner><![CDATA[navneetsinghlall@substack.com]]></googleplay:owner><googleplay:email><![CDATA[navneetsinghlall@substack.com]]></googleplay:email><googleplay:author><![CDATA[Navneet Singh]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[The Agentic Engineering Field Guide, Part 4: Where I Land, and Why]]></title><description><![CDATA[The recommendation I make to most of my enterprise clients, when I do not make it, three war stories, where this is all heading, and a thirty minute decision framework you can run with your team this week.]]></description><link>https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part4</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part4</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Mon, 04 May 2026 02:30:56 GMT</pubDate><content:encoded><![CDATA[<h2>Where I Land</h2><p>For my typical client, I recommend Microsoft Agent Framework on Microsoft Foundry.</p><p>The typical client is an enterprise shop. Regulated industry. .NET heavy. Azure already in production. Approval gates required. Audit trails required. Data residency matters. The buyer is a CIO or CTO whose procurement team has a standing Microsoft agreement. That describes most of my healthcare, financial services, and government work. If that also describes your shop, my recommendation is to start there.</p><p>This is not an abstract preference. It is the same decision I make with every qualifying client after we have walked through the six questions from Part 1.</p><p><strong>State and durability.</strong> The workflow graph checkpoints at superstep boundaries. Cosmos DB checkpoint storage shipped in MAF Python 1.0.1. Durable Task integration through the Azure Functions extension handles the day-long and week-long pauses that happen when a human approval takes its time. This is the question that kills most frameworks in production. MAF plus Foundry answers it without ceremony.</p><p><strong>Approval gates.</strong> Durable pause state that survives application restarts is first class. Not bolted on. Not a hack you build with external queues. The framework holds the pause. The pattern composes with the rest of your workflow.</p><p><strong>Observability.</strong> OpenTelemetry everywhere. App Insights out of the box. The trace surface maps cleanly to every other Azure service your SRE team already monitors. If your observability story is already Azure Monitor, you do not introduce a new tool.</p><p><strong>Identity.</strong> Every agent gets a dedicated Microsoft Entra identity with RBAC scoped to the resources it needs. Entra Agent Registry catalogs the deployed agents. This is the first production-grade identity story I have seen in an agent platform. For regulated industries, this alone is worth the choice.</p><p><strong>Compliance.</strong> Azure carries the broadest compliance portfolio in the cloud market. FedRAMP High via Azure Government. HIPAA. ISO 27001, 27017, 27018, 27701. HITRUST. SOC. PCI. EU Data Boundary. Microsoft Cloud for Sovereignty for the EU sovereign stack. 21Vianet for China. India RBI, IRDAI, MeitY. When procurement asks for the compliance matrix, it already exists.</p><p><strong>Model choice.</strong> Foundry is model agnostic despite Microsoft's commercial incentives. OpenAI, Anthropic, Meta, Mistral, Cohere, DeepSeek, NVIDIA, Microsoft's own Phi family, plus 1,500+ models through Hugging Face compute. You are not forced into any one model provider. That is the right call for enterprise buyers who do not want to bet on one model lab.</p><p><strong>On-prem and air-gapped.</strong> Foundry Local is the quiet differentiator nobody else has. C#, JavaScript, Rust, Python SDKs. ONNX Runtime under the hood. OpenAI-compatible API. No Azure subscription required. Same SDK patterns as cloud Foundry. For the healthcare customer who needs to keep data on-premises, or the government customer who needs air-gapped inference, you get a Microsoft-shipped runtime that you can deploy inside the compliance boundary. Neither Vertex nor Bedrock has a first-party on-device counterpart with matching SDK ergonomics.</p><p><strong>Framework-agnostic runtime.</strong> The quiet competitive move: Foundry Hosted Agents accept LangGraph or arbitrary containerized code, not just MAF. Foundry positions itself as a control plane, not a framework lock-in. So even if your team decides tomorrow that LangGraph is the better fit for a specific workflow, you can deploy it inside Foundry and keep the enterprise spine. That is the option I want on my side when I am betting on a platform.</p><p>The procurement story matters more than the feature story sometimes. When your buyer already has a Microsoft Enterprise Agreement, adding Foundry is a line item, not a new vendor evaluation. That shortens the deal cycle by months. The technical merits make the case easy. The procurement reality closes the deal.</p><div><hr></div><h2>When I Do Not Pick It</h2><p>MAF plus Foundry is my default for enterprise, regulated, Microsoft-shop clients. It is not the right call for every shop. Here is where I go elsewhere.</p><p><strong>Python-pure shops with no .NET footprint.</strong> If your engineering team has zero .NET expertise, no appetite to learn it, and your existing services are all Python, then LangGraph plus LangSmith is the stronger technical fit. The ecosystem is larger. The graph semantics are more mature. The checkpointer ecosystem is richer (Postgres, Redis, SQLite, in-memory). LangSmith is the most battle-tested tracing product in the space. You get most of the enterprise capability without the .NET surface area you will never use.</p><p><strong>GCP-native shops.</strong> If your organisation runs on GCP, BigQuery is your data gravity, and Gemini is your preferred model family, then Google ADK plus Vertex AI Agent Engine is cleaner than bolting Azure services onto a Google stack. Cross-cloud integration tax is real. Pick the cloud your infrastructure already lives in.</p><p><strong>AWS-native shops with strict cost or latency SLAs.</strong> AWS Strands plus Bedrock Agents is the path of least resistance on AWS. Bedrock's service tier controls (Priority, Standard, Flex) that Strands exposes are unique. If your workload has genuine SLA sensitivity on inference cost or latency, this is real. If you are already spending heavily on Bedrock, the economics of staying in that ecosystem make sense.</p><p><strong>TypeScript-first product teams.</strong> If you ship a web product on Next.js or a Node backend and your engineering team writes TypeScript end to end, Mastra is the serious option. The MAF TypeScript story is thin. LangGraph has TypeScript bindings but Python is the first-class surface. Mastra is built for the Node world and has matured enough to be credible.</p><p><strong>Observability-critical early stage startups.</strong> If your team is small, observability is the feature that saves you, and LangSmith is going to be your debugging lifeline from day one, then LangGraph plus LangSmith gets you there faster than any other combination. The coupling is tight and the ergonomics are designed around it. You can migrate to a more enterprise stack later when your buyer changes shape.</p><p><strong>Pure prototyping speed.</strong> For a two-week proof of concept, CrewAI is hard to beat. The "team of agents" metaphor maps onto a slide deck and a demo faster than any other framework. This does not mean I would ship it to production. It means I would not fight the client who wants to prove out the idea in CrewAI first, then re-implement in a more durable stack when the scope is clear.</p><p><strong>Coding or developer tools.</strong> If you are building a coding agent, a CLI tool, or anything that inherits the shape of Claude Code, the Anthropic Claude Agent SDK gives you the mature tool loop (Read, Write, Edit, Bash, etc.) without rebuilding it. For that narrow use case, it is the fastest path.</p><p><strong>Low-code citizen developer agents.</strong> If the business user is the builder and the agent lives inside Microsoft 365 or Teams workflows, Copilot Studio is a different product with a different audience. The MAF plus Foundry story is pro-code and developer-centric. Do not force the wrong tool.</p><p><strong>Agentforce or ServiceNow as a buy-vs-build choice.</strong> If the agent's job is to answer a well-scoped question inside Salesforce or ServiceNow data, and the SaaS vendor has already shipped that agent, buy it. Build only what gives you differentiation. I have talked several clients out of building their own customer service agent because Agentforce already solves 80 percent of their problem at a fraction of the cost of building it well.</p><div><hr></div><h2>Three War Stories</h2><p>These are archetypal patterns from client work, generalised to protect confidentiality. Each reflects a real build, a real decision point, and something I would do differently with today's tools.</p><h3>Healthcare contract analysis</h3><p>A hospital group needed to process executed vendor contracts. Extract key terms. Flag clauses that deviated from their standard template. Surface renewal dates and termination windows. Generate a summary for the procurement team. Twelve documents per week in good weeks. Forty in bad ones.</p><p>We built this on a twelve-step graph. Document ingestion, OCR cleanup, section classification, entity extraction, clause comparison against a library of approved standards, risk scoring, flagging, summarization, storage, notification. Each step was an executor. The graph ran in roughly four minutes end to end in the happy path.</p><p>The fifth deployment, step nine started failing. The internal API it called had been migrated. We did not know for three hours because the only signal was customer-facing summaries that looked a little worse than usual. When we looked at the checkpoint state, we could see the exact input that was crashing the step. We fixed the integration, resumed every queued workflow from the checkpoint, and the customer never knew there had been a partial outage.</p><p>That same workflow, a year earlier on a different framework, would have lost every in-flight contract to a full restart. We would have burned the token budget for the first eight steps on every failed run until we shipped the fix.</p><p>The lesson: pick the framework that treats state as a first-class citizen, not as a debugging convenience.</p><h3>Financial services reconciliation</h3><p>A mid-market finance firm wanted to reconcile end-of-day trade confirmations across three upstream systems. The inputs disagreed often enough to be a real problem. A human team was spending two hours every evening resolving the discrepancies by hand.</p><p>The first architecture we considered was a single agent with many tools. Load this, load that, compare, output the differences. It would have worked for the first month. The tool count for the three upstream systems plus the output destinations was already fourteen. I knew where this ended.</p><p>We built it as a hierarchical multi-agent workflow instead. A manager agent owned the reconciliation task. Three specialist agents each owned one upstream system. A fourth specialist owned output and escalation. The specialists did not know about each other. The manager composed their outputs and decided when a discrepancy needed human review versus when the rules made the resolution obvious.</p><p>Six months in, a fourth upstream system came into scope. Adding it was one new specialist agent and one new edge in the graph. The other specialists did not change. That is the compound value of composition done right. Monolithic agents do not have this property.</p><p>What I would do differently: we under-invested in the eval harness at the start. We shipped with regression tests at the agent level but not at the workflow level. Two months in, the model provider bumped a minor version and the manager's routing accuracy dropped a few points. We caught it in production through a spike in manual escalations. If I were building this today, I would have workflow-level evals in place from day one and alerts on routing accuracy drift.</p><h3>Government citizen services</h3><p>A state government wanted to reduce call volume at a busy services line. First-line triage. Answer simple questions. Route complex ones to human agents. Keep the conversation in the citizen's preferred language. Nothing leaves the sovereign cloud.</p><p>This was a case where the platform choice mattered more than the framework choice. The non-negotiables were data residency, audit trails that would survive a regulatory review, and the ability to run inference inside the sovereign boundary. Foundry's compliance posture, Entra Agent Registry for agent identity, and Foundry Local for the on-premises inference scenario were the answer.</p><p>The agent uses a hand-off pattern. A triage agent reads the incoming request, detects language, identifies intent. Simple queries (where is my application, how do I pay this fee) are answered directly from the internal knowledge base via Foundry IQ. Complex or sensitive queries route to a human agent through the same platform with the conversation history intact.</p><p>Observability is where this build paid off. Every agent decision is traced, queryable, and exportable. When the regulator audits, we can show exactly which queries were answered by the agent, which went to humans, and what the conversation looked like. That is the difference between a system you can defend and a system you cannot.</p><p>The lesson: for regulated and sovereign scenarios, the platform spine matters more than the framework elegance.</p><div><hr></div><h2>Where This Is All Heading</h2><p>Twelve month view. What I expect the landscape to look like by April 2027.</p><p><strong>Protocols will matter more than frameworks.</strong> MCP is already universal. A2A reached v1.0 in March 2026. By this time next year, the lock-in cost of picking the wrong framework will be lower than it is today because you will be able to swap frameworks while keeping your protocol-level integrations. Bet on frameworks that speak protocols fluently. The specific framework matters less every quarter.</p><p><strong>On-premises inference will resurge.</strong> The first wave of enterprise AI was cloud-first because that is where the capable models lived. Open-weights models are now capable enough for many production workloads. Foundry Local, vLLM, Ollama, and the NVIDIA AI Enterprise stack make on-device and on-premises deployment credible. For regulated industries and data-sensitive workloads, expect a real shift back to on-premises or sovereign cloud over the next year. The vendors that have shipped the tooling for this (Microsoft with Foundry Local, Amazon Bedrock with Outposts, Google with Distributed Cloud) will benefit.</p><p><strong>Multi-agent will hit a limit and retreat.</strong> The last eighteen months have been a period of maximalist multi-agent design. Five specialists. Seven specialists. Ten specialists. I am already seeing teams retreat from this. The marginal specialist often adds more latency and failure modes than value. Expect the consensus to settle around three to five specialists for a typical production workflow, with a preference for hierarchy over peer collaboration.</p><p><strong>Evaluation becomes the bottleneck.</strong> Once everyone has durable state, checkpointing, approval gates, and tracing, the remaining differentiator is whether your evals catch regressions before your customers do. Expect eval tooling to become the hottest segment of the agentic infrastructure market in the next year. Expect acquisition activity. Expect major framework vendors to ship first-party eval platforms (some already are).</p><p><strong>Memory becomes a category, not a framework feature.</strong> Letta, Zep, and new entrants are making memory a first-class database tier that sits alongside your vector store and your Postgres. Frameworks are good at orchestration. They are mediocre at memory. Decay policies, reflection trees, virtual context paging, and sleep-time consolidation are not things you want to maintain inside your agent framework. Expect memory-as-a-service to win a meaningful slice of the agentic infrastructure market by next April, much as vector databases did in 2023. For CTOs, the question in 2026 is still "what memory primitives does my framework ship." In 2027 it will be "which memory vendor do I pick."</p><p><strong>Cognitive architectures become pluggable.</strong> Decay-aware retrieval, sleep-time compute, reflection trees, skill libraries, and virtual context paging are bespoke builds today. By next April, expect these to ship as framework-native features or pluggable middleware. Teams that invested in building them from scratch this year will rebase onto the shipping versions. Teams that skipped them will get them for free by upgrading. Either group wins relative to teams that never knew the patterns existed.</p><p><strong>Self-improving agent systems ship in the human-in-the-loop form.</strong> Fully autonomous self-improvement is not arriving in the next twelve months. Production-grade eval-to-training pipelines, trajectory distillation through RFT or open-weight fine-tuning, and prompt optimization feedback loops are all shipping now and will be standard by mid-2027. The differentiator is whether your team has built the pipeline that feeds production traces back into offline training. Most have not. The teams that do compound. The teams that do not ship the same agent they launched with, just older.</p><p><strong>Regulatory pressure reshapes the stack.</strong> EU AI Act enforcement is already biting. India's DPDP enforcement is arriving. The US is catching up state by state. For regulated industries, the ability to document training data provenance, model versioning, and agent decisions will become a procurement checkbox. Frameworks that cannot answer these questions will get filtered out of enterprise deals regardless of technical merit.</p><p><strong>The SaaS agent layer will mature and compete directly with custom builds.</strong> Salesforce Agentforce, ServiceNow AI Agents, and the Microsoft 365 Copilot ecosystem are already changing what enterprises build in-house. A year from now, the default recommendation for well-scoped customer service or ITSM agents will be "buy the SaaS layer, build custom only where you differentiate." Custom agent builds will concentrate in the workflows that are genuinely unique to your business.</p><p><strong>The model layer will become boring, and that is good.</strong> The gap between top labs is narrowing. The gap between top open-weights models and top closed models is narrowing. Pricing is dropping across the board. Prompt caching has changed the economics of long-context workflows. By next April, model selection will feel more like database selection. Important. Reversible. Not the differentiator it was two years ago.</p><div><hr></div><h2>The Thirty Minute CTO Decision Framework</h2><p>You have a meeting in thirty minutes with your team. You need to pick a direction. Run this.</p><p><strong>Question 1: What is your dominant engineering stack?</strong></p><p>.NET &#8594; Microsoft Agent Framework plus Foundry.
Python &#8594; LangGraph plus LangSmith, or the provider SDK matching your cloud.
TypeScript or Node &#8594; Mastra, or LangGraph TypeScript.
Java or Go &#8594; Google ADK has the best multi-language story.</p><p><strong>Question 2: Which cloud, and is multi-cloud required?</strong></p><p>Azure-heavy &#8594; Foundry.
AWS-heavy &#8594; Bedrock plus Strands.
GCP-heavy &#8594; Vertex plus ADK.
Multi-cloud required &#8594; open framework plus protocols (MCP, A2A). Bet on interop.</p><p><strong>Question 3: What regulatory constraints do you have?</strong></p><p>HIPAA, FedRAMP, sovereign cloud, data residency &#8594; Microsoft Foundry has the broadest compliance coverage. Bedrock is the close second for GovCloud scenarios.</p><p><strong>Question 4: How long is your longest workflow?</strong></p><p>Under thirty seconds &#8594; any framework works.
Thirty seconds to five minutes &#8594; you need checkpointing.
Five minutes to hours &#8594; graph-based framework with durable state is required.
Hours to days &#8594; MAF plus Durable Task, LangGraph plus Postgres checkpointer, or a purpose-built workflow engine (Temporal, Dagster with AI) with an agent layer.</p><p><strong>Question 5: Will humans approve before writes?</strong></p><p>Yes, and the approval can take hours or days &#8594; you need first-class human-in-the-loop with durable pauses. MAF, LangGraph, and Pydantic AI have this. Many others do not.</p><p><strong>Question 6: What is your observability maturity?</strong></p><p>Already running OpenTelemetry &#8594; pick a framework with clean OTel conventions for agents.
No observability yet &#8594; add LangSmith, Braintrust, or Foundry Observability as a dependency of the build.</p><p><strong>Question 7: What is your buy-versus-build reality?</strong></p><p>Is this a workflow that differentiates your business, or is it the same customer service, HR, or ITSM flow every enterprise runs? If the latter, evaluate Agentforce or ServiceNow before you build. Build only where you differentiate.</p><p><strong>A note on frontier patterns.</strong> The seven questions above decide your framework. They do not decide whether to invest in decay-aware memory, sleep-time compute, reflection trees, or trajectory distillation. Those are capability-level decisions, not framework-level. Most teams should ship the basics first and reach for frontier patterns when the baseline is solid and the cost of staleness, context overflow, or stagnant skill is visibly hurting the product. If your agents run fewer than twenty turns per session and each session is independent, you probably need none of them. If they run for months with the same user and cannot afford to rebuild from scratch, every frontier pattern starts to pay. Part 3 walks each one and tells you when it is worth the complexity.</p><p>Run these seven questions. In most cases, the answer collapses to one or two frameworks. From there, prototype and ship.</p><div><hr></div><h2>Series Close</h2><p>This is the end of the first pass. Four parts. The questions, the landscape, the building blocks, and where I land.</p><p>The frameworks in this guide will change. Some will fade. Others will emerge. The protocols will mature. The eval tooling will consolidate. The model layer will become boring. That is all fine. The questions in Part 1 are the durable part. The mental model is what you keep.</p><p>I will update this guide every quarter. The next revision lands in July. Some parts will change heavily. Part 2 will change the most because the landscape moves fastest. Part 1 will change least because the questions do not age.</p><p>If you are building an enterprise agent system this year and you want a second pair of eyes on your architecture, email or find me on LinkedIn. The clients I work with best are the ones who have walked through the six questions, know where they stand, and want to pressure-test the answer. I read every reply.</p><p>We are early. The systems we build this year will shape what enterprise AI looks like for the rest of the decade. Worth getting right.</p><div><hr></div><p><em>Navneet Singh is the founder and CEO of Webority Technologies. He builds enterprise AI systems for clients in healthcare, financial services, and government, and writes weekly about what actually works.</em></p>]]></content:encoded></item><item><title><![CDATA[The Agentic Engineering Field Guide, Part 3: The Building Blocks]]></title><description><![CDATA[Memory, RAG, tools, context, safety, cost, identity, and planning. The patterns every production agent build hits regardless of framework. Where the ecosystem actually lands in April 2026.]]></description><link>https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part3</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part3</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Fri, 01 May 2026 02:30:12 GMT</pubDate><content:encoded><![CDATA[<h2>Why This Part Matters More Than The Framework Choice</h2><p>Framework choice is the decision teams obsess over. The building blocks are the decision teams skip. That is backwards.</p><p>A team on the best framework with the wrong memory pattern has a bad product. A team on a mediocre framework with the right evaluation harness ships reliably. The patterns in this piece are what separate the agent systems that survive in production from the ones that get quietly shelved after six months.</p><p>I have been in the room for a lot of those quiet shelvings. Every one of them failed on a building block, not on the framework. The agent never remembered the user correctly. The retrieval missed the key document. The eval harness did not catch the regression that the customer did. The cost doubled after a model provider changed its pricing and nobody noticed for three weeks.</p><p>This piece walks each building block in the order I evaluate them with clients. Memory. RAG. Tools. Context. Safety. Cost. Identity. Planning. For each one: what the pattern is, what the ecosystem ships in April 2026, and the honest failure modes you will hit in production.</p><div><hr></div><h2>Memory</h2><p>The vocabulary has settled. The CoALA taxonomy from 2024 is now the consensus. Three kinds of memory.</p><p><strong>Semantic memory</strong> is facts. What the user's name is. What their preferences are. Which account tier they are on. What the contract terms are. The things you would put in a database if your system were not agentic.</p><p><strong>Episodic memory</strong> is experiences. What the agent did in the last session. What tool calls succeeded and failed. Which responses worked and which got a frustrated reply. The trajectory history.</p><p><strong>Procedural memory</strong> is instructions. How to handle a particular scenario. Which steps to take for a given task type. This usually ends up encoded in the system prompt, but recent work treats it as something the agent can revise over time.</p><p>The second axis is scope. Short-term memory lives inside the context window and is managed by the framework's checkpointer. Long-term memory lives in a namespace that survives sessions and is retrieved on demand. A third term, working memory, now gets used two different ways. In some frameworks it means the same thing as short-term. In Mastra it means a persistent structured profile that is always loaded. When you talk to your team about working memory, be explicit about which meaning you are using. I have seen real architectural disagreements traced to this one word.</p><h3>The Consolidation Pattern Is The Thing</h3><p>The pattern that makes long-running agents work is consolidation. A background process reads the episodic log and writes semantic or procedural summaries. Without it, your agents either lose information (short context) or drown in it (context overflow).</p><p>The reference implementations to study:</p><p>Mastra's Observational Memory, generally available in early 2026, uses background agents to maintain a dense observation log that replaces raw message history as it grows. Context stays small. Long-term memory stays rich.</p><p>LangChain's LangMem SDK ships <code>create_memory_manager</code> with explicit control over hot-path extraction (synchronous, cheap, brittle) versus background extraction (async, expensive, more reliable). This is the right abstraction. Most production systems need both.</p><p>Anthropic's memory tool shipped public beta in September 2025 on Claude Sonnet 4.5 and is now generally available on Opus 4.6 and Sonnet 4.6. It is a file based tool Claude calls with <code>create</code>, <code>read</code>, <code>update</code>, and <code>delete</code> operations against a developer-managed storage backend. Anthropic reports a 39 percent improvement on internal agentic-search evaluations when combined with context editing, and 84 percent token reduction on 100-turn web search tasks. Critical detail: the memory tool operates entirely client side through tool calls. You own the persistence layer.</p><p>Claude Code's pattern is conceptually the same thing. Background consolidation into a persistent memory directory, then reinsertion on every turn.</p><h3>Framework State April 2026</h3><p><strong>Anthropic memory tool.</strong> GA on 4.6 models. You manage storage.</p><p><strong>LangGraph Store plus LangMem.</strong> <code>BaseStore</code> API with namespace scoping, semantic search, filter by content. LangMem adds memory manager, store manager, and prompt optimization primitives on top. The most complete memory story in an open framework today.</p><p><strong>Microsoft Foundry Memory tool.</strong> Preview as of March 2026. Integrated into Foundry Agent Service alongside web search, file search, and code interpreter. Region-gated.</p><p><strong>OpenAI Memory.</strong> The developer-facing story is the Responses API plus stored conversations plus File Search. There is no first-class memory tool equivalent to Anthropic's. Teams build their own.</p><p><strong>Mastra Memory.</strong> Working memory (structured profile), semantic recall over past messages, Observational Memory. Automatic thread and resource isolation in multi-agent systems. Deterministic subagent resource IDs derived from parent. The cleanest memory ergonomics if you are on TypeScript.</p><p><strong>CrewAI memory.</strong> Short-term, long-term (SQLite by default), entity memory (RAG over named entities), user memory. Lighter weight than LangGraph or Mastra. Fewer knobs to turn.</p><p><strong>Pydantic AI.</strong> Does not ship memory primitives. You pass message history into the agent call. Memory is your problem. This is an intentional design choice that says "we do not hide the model."</p><h3>Honest Failure Modes</h3><p>Memory staleness is the first failure you will see. The agent confidently asserts a fact the user corrected weeks ago because the old fact was never overwritten. Collection-style memories are worse than profile-style here. If a user's preference can change, make sure your memory pattern supports update, not just append.</p><p>Memory explosion is the second. Naive "remember everything" pipelines produce thousands of near-duplicate entries. Retrieval drowns in noise. The cure is deduplication, compaction, and ruthless eviction.</p><p>Cross-user bleed is the third and scariest. Namespace bugs leak one user's memory to another. The LangMem team calls this out explicitly as the reason they made <code>user_id</code> a first-class namespace. If your memory story does not have tenant isolation at the storage layer, you have a security bug waiting to happen.</p><p>Hot-path extraction slowing every turn by 2 to 4 seconds is the fourth. It feels fine until you measure. Run extraction in the background.</p><p>Consolidation agents hallucinating summaries and poisoning the knowledge base permanently is the fifth. Review queues matter. For high-stakes memories, a human gate on consolidation is cheap insurance.</p><h3>Frontier Patterns</h3><p>Consolidation is the table stakes pattern. The next tier of memory architecture is where production systems are still catching up to research. These are the patterns you should know about, evaluate with judgment, and reach for when the baseline is no longer enough.</p><p><strong>Decay and recency-weighted retrieval.</strong> The Generative Agents paper from Park et al. at Stanford in 2023 proposed scoring each memory on three axes. Recency, with exponential decay over elapsed time since last access. Importance, a model-scored salience label. Relevance, embedding similarity to the current query. Retrieval ranks by the weighted sum of the three. The model is better than naive similarity alone because a highly-relevant but stale memory loses to a less-relevant but fresh one when that is the right call.</p><p>In production, fixed TTL on memories is almost always wrong. User preferences can persist for years. A tool result is often stale in hours. A session fact is useful for a day. The decay function should be per-memory-type, not global. Letta exposes per-block configuration. Zep's temporal knowledge graph tracks validity windows on individual facts. Mastra's Observational Memory compacts older observations into denser summaries rather than deleting them, which is a softer form of decay. Anthropic's memory tool leaves decay entirely to your storage layer, which is honest but unhelpful if you do not have a decay policy of your own.</p><p>What I tell clients: do not build a one-size-fits-all decay curve. Tag every memory with a type (preference, session fact, tool result, observation, commitment) and set decay policy per type. This adds a day of work up front and prevents the category of bug where the agent remembers something it should have forgotten, or forgets something it was supposed to keep for a year.</p><p><strong>Virtual context and paging.</strong> MemGPT from Packer et al. in 2023 made the case that context-window management should look like an operating system. A small core memory stays resident. Archival memory lives on disk and pages in on demand through explicit agent-issued tool calls. The agent literally reads and writes its own memory with functions like <code>core_memory_append</code>, <code>archival_memory_insert</code>, and <code>archival_memory_search</code>. The model manages its own working set.</p><p>Letta is the commercial heir. Active project, Python-first, agent-as-service architecture where the agent runs as a persistent process with memory state surviving across restarts. Used in production at a growing number of companies, with integrations appearing for LangGraph and Mastra that let Letta serve as a pluggable memory backend. The right fit when your agent holds long-running state across sessions with the same user and you want the model to explicitly decide what stays in core context.</p><p>Be honest about where paging wins. For short, stateless request-response agents, virtual context is overkill. For an agent that has a months-long relationship with a user, it is one of the few patterns that scales without getting gradually dumber. The middle ground, where ordinary consolidation into a summary is enough, is where most production teams actually sit. Reach for virtual context when the consolidation pattern is already in place and you are still losing important facts in the summary step.</p><p><strong>Sleep-time compute and offline reflection.</strong> The idea. Agents do their best thinking when idle. Between user turns, overnight, or in batch, a background process reads recent trajectories and produces reflections, revised plans, updated skill documents, or rewritten memory entries. The user never waits for this work. The agent wakes up smarter than it went to sleep.</p><p>Letta ships explicit sleep-time agents that run on a configurable cadence. Mastra Observational Memory does a narrower version implicitly through background consolidation. Claude Code's pattern of background memory rewrites between sessions is another narrow form of the same idea. Recent academic work has framed sleep-time compute as a distinct scaling axis, alongside pre-training compute and test-time reasoning compute, with its own cost and quality curves.</p><p>Production use is early. The failure mode is obvious. If your reflection agent hallucinates a bad summary overnight, you wake up with a confidently wrong agent. The mitigations are the same as with consolidation. Review queues on high-stakes rewrites. Diff logs so a human can see what the reflection changed. Never let a reflection agent overwrite user-provided facts.</p><p>The CTO call. Consider sleep-time compute for agents that are accessed infrequently by each user (once a day, once a week) where the reflection cost is amortized over many user interactions, and where coherence across sessions is a visible product feature. Skip it for high-throughput short-turn agents where every interaction stands alone.</p><p><strong>Reflection trees.</strong> The other half of the Generative Agents contribution. Periodically, the agent looks at a batch of recent memories, asks itself what questions those memories raise, answers the questions using the same memory store, and writes the answers back as higher-level memories. The tree emerges from recursion. A week-old interaction gets abstracted into a one-line insight. The one-line insights get abstracted into a paragraph-long trait. The agent builds its own theory of the user without anyone writing the theory down.</p><p>This is a pattern you can implement on top of any memory system that supports insertion with metadata. Mastra, LangMem, and Letta all have the primitives. No mainstream framework ships it as a turnkey feature. The value is real when your agents have a rich episodic log and the user cares about long-term coherence (coaching, therapy, executive assistant, tutor). The cost is model calls for the reflection work, paid on a schedule you control. Budget for it.</p><p><strong>Workflow memory.</strong> Agent Workflow Memory takes procedural memory further. The agent extracts reusable workflow patterns from its own successful trajectories and stores them as named recipes, parameterized by the variable parts. Next time a similar task arrives, it retrieves the matching workflow and follows it instead of planning from scratch. Research results on web navigation benchmarks are meaningful.</p><p>Production adoption is shallow. The closest shipping analogue is Anthropic Skills, but Skills are human-authored folders, not auto-extracted workflows. Automatic workflow synthesis from traces remains research-grade. Early adopters are building this themselves. The pattern I have seen work is a weekly batch job that reads LangSmith or Braintrust trace exports, clusters trajectories by task similarity, proposes candidate workflows, runs a human review, and promotes the approved ones into the agent's skill library. That pipeline ships. It is not turnkey.</p><p><strong>Hierarchical memory beyond two-tier.</strong> MemGPT's two-tier model (core plus archival) is the current de facto standard. CoALA hints at richer hierarchies. Sensory buffers. Short-term working memory. Medium-term episodic buffers. Long-term consolidated knowledge. In practice, nobody has shipped a five-tier production system that outperforms the two-tier one by enough to justify the complexity. The tier count is not the insight. The insight is that different memory types need different retention, retrieval, and consolidation policies. You get most of the benefit with a two-tier architecture plus per-type policies, not with adding more tiers.</p><h3>When To Reach For Frontier Memory</h3><p>A simple decision rule. If your agent runs fewer than twenty turns per session and each session is independent, the standard consolidation pattern is enough. Stop there. If your agent runs for weeks or months with the same user and the quality of the relationship compounds, you will need at least two of the frontier patterns. Start with decay-aware retrieval and reflection trees. Add virtual context if context overflow becomes the binding constraint. Add sleep-time compute if user-perceived intelligence-per-session is what you are selling.</p><p>Do not add all of them at once. Each has a cost in complexity and in model calls. Each is also a new surface where the agent can corrupt its own memory. Add them one at a time with eval coverage on what you expect to improve.</p><div><hr></div><h2>Retrieval Augmented Generation</h2><p>Classic RAG is still the baseline. Chunk the documents. Embed the chunks. Retrieve the most similar chunks for a query. Stuff them into the prompt. It remains the right starting point because it is cheap, understandable, and composable. It rarely ships alone anymore.</p><h3>The Patterns You Actually Ship</h3><p><strong>Agentic RAG</strong> is now the dominant production pattern. The agent decides whether to retrieve at all, issues multiple queries with different formulations, reads tool descriptions, and can re-query after inspecting initial results. Foundry File Search, OpenAI File Search in the Responses API, and Anthropic's web-fetch and web-search tools are all agent driven. The model, not a pre-built pipeline, decides when to reach for data.</p><p><strong>Graph RAG.</strong> Microsoft's GraphRAG builds a knowledge graph of entities, relationships, and claims, runs Leiden clustering, generates community summaries, and answers via Global, Local, or DRIFT search. Global is for broad "what are the themes" questions. Local walks entity neighborhoods. LazyGraphRAG, from Microsoft Research in late 2024, defers LLM work to query time. It builds a cheap graph index with NLP-extracted concepts instead of full LLM summarization, then uses the LLM only during search. Microsoft's published claim is roughly 0.1 percent of GraphRAG's indexing cost at comparable answer quality. That is the difference between GraphRAG being viable on millions of documents and not.</p><p><strong>Contextual retrieval.</strong> Anthropic's technique from September 2024. Prepend a 50 to 100 token chunk-specific context to each chunk before embedding and before BM25 indexing. Reported results: contextual embeddings alone cut retrieval failure rate by 35 percent. Contextual embeddings plus contextual BM25 cut it by 49 percent. Adding a reranker pushed the total improvement to 67 percent. The preprocessing cost is about 1.02 dollars per million document tokens using Haiku with prompt caching. This is now standard. Most new RAG stacks bake it in by default.</p><p><strong>Hybrid retrieval.</strong> BM25 plus dense vectors, fused with Reciprocal Rank Fusion. The consensus default for production. Pure vector search loses exact-match queries like product codes, SKUs, and error codes. Pure BM25 loses semantic paraphrase. Every serious retrieval stack does both.</p><h3>Rerankers</h3><p>Cohere Rerank 3.5 from December 2024 is the commercial leader with strong multilingual reasoning. Cohere Rerank v4 is now sold directly through Azure Foundry Models. Voyage rerank-2.5 is popular for finance and legal. BGE-reranker-v2 and Jina Reranker v2 are the open-weight choices. BGE for cost. Jina for multilingual. Cross-encoder models from the ms-marco-MiniLM family still beat nothing for pennies when latency is not critical.</p><p>Rule of thumb: retrieve top 50 to 100 candidates, rerank to top 5 to 10. Reranking adds 50 to 300 milliseconds of latency. That is why latency-sensitive apps skip it. Most apps should not.</p><h3>Vector Databases, April 2026 Positions</h3><p><strong>Pinecone</strong> is still the managed default for teams who want zero ops. The serverless tier is aggressive on price.</p><p><strong>Qdrant</strong> is the Pinecone alternative of choice for self-hosted. Rust core, strong filtering.</p><p><strong>Weaviate</strong> is hybrid native from day one with strong multi-tenancy.</p><p><strong>pgvector with pgvectorscale from Timescale</strong> is the right answer when you already have Postgres. StreamingDiskANN through pgvectorscale closed the performance gap for most workloads.</p><p><strong>Turbopuffer</strong> is object-storage backed and extremely cheap for cold data. The darling of 2025 for billion-scale low-QPS workloads.</p><p><strong>LanceDB</strong> is embedded and popular for desktop, edge, and Mastra-style local-first stacks.</p><p><strong>Azure AI Search, Vertex Vector Search, and Bedrock Knowledge Bases</strong> are the hyperscaler answers. Pick based on where your compliance and data gravity already live.</p><p><strong>Chroma</strong> is dev and prototype. Production deployments have mostly migrated off.</p><h3>Managed RAG Offerings</h3><p><strong>Foundry IQ</strong> is Microsoft's knowledge layer for enterprise agents. It unifies Azure AI Search, SharePoint, OneDrive, and custom sources, and integrates with File Search in Agent Service.</p><p><strong>Vertex RAG Engine</strong> is managed chunking plus embedding plus retrieval. Integrates with Vertex Vector Search and Gemini grounding.</p><p><strong>Bedrock Knowledge Bases</strong> handle managed ingestion from S3, Confluence, SharePoint, Salesforce, and web sources. Supports hybrid search, reranking, and GraphRAG via Neptune Analytics.</p><p><strong>OpenAI File Search</strong> is a tool inside the Responses API. Handles vector store creation, chunking, retrieval, and citations with minimal configuration.</p><h3>Honest Failure Modes</h3><p>Chunks without context is the single biggest accuracy killer. The "3 percent revenue growth" example from the Anthropic contextual retrieval paper is not an edge case. It is the median production bug. Every chunk needs enough context for standalone retrieval to make sense.</p><p>Recall cliffs at top-k boundaries. Your ranking puts the right document at position 11 when you retrieve 10. Expand your retrieval window, then rerank.</p><p>Embedding model mismatch. Your stored embeddings are from <code>mpnet-base-v2</code> from 2022. Your queries are from <code>text-embedding-3-large</code>. Your similarity scores are meaningless. Re-embed when you upgrade.</p><p>Evaluator theater. LLM as judge on RAG that rewards fluent wrong answers. Use groundedness metrics, not just answer quality.</p><p>Freshness. Documents change. Embeddings drift. Nobody re-indexes until a customer complains. Put a freshness policy in place from day one.</p><div><hr></div><h2>Tools Beyond MCP</h2><p>Function calling has converged. OpenAI, Anthropic, and Gemini all support structured tool schemas, parallel tool calls, and forced tool calls. Parity for basic use cases. Differences show up in fine-grained streaming, programmatic tool calling, and tool-search features for large tool catalogs. Anthropic ships tool search and programmatic tool calling as first-class features when you have more than 30 tools in the loop. This matters if you have a big tool inventory.</p><p><strong>Computer use.</strong> Anthropic's computer use tool is beta with the header <code>computer-use-2025-11-24</code> for Opus 4.6, Sonnet 4.6, and Opus 4.5. Screenshot, mouse, keyboard, and desktop automation. State-of-the-art results on WebArena among single-agent systems. OpenAI ships Operator (consumer) and the <code>computer-use-preview</code> model for developers through the Responses API. Gemini's equivalent is Computer Use in the Gemini API. All three remain reliability-limited for multi-step workflows. Expect 40 to 70 percent task completion on real workloads. If your use case depends on computer use in production, plan for human fallback.</p><p><strong>Code interpreters.</strong> OpenAI Code Interpreter is generally available inside the Responses API and Assistants. Anthropic's Code Execution Tool is beta and required for Skills. Microsoft Foundry Code Interpreter is generally available, Python sandboxed, supports data analysis and chart generation. All three are stateful within a session and ephemeral across sessions unless you mount storage.</p><p><strong>Skills.</strong> Anthropic Agent Skills launched October 16, 2025, and became an open standard on December 18. A skill is a folder with a <code>SKILL.md</code> file plus scripts and resources that Claude loads only when relevant. Composable, portable, progressive disclosure. Identical format across Claude apps, Claude Code, and the API through the <code>/v1/skills</code> endpoint. Requires the Code Execution Tool beta. Microsoft Agent Framework's class-based skills in MAF 1.x are the closest equivalent in the Microsoft stack, with class hierarchies instead of Markdown folders. The industry direction is clearly progressive disclosure. Ship instructions as files. Load on demand. Do not put everything in the system prompt.</p><p><strong>Browser automation.</strong> Playwright is the plumbing. Microsoft Playwright MCP and the native Anthropic Playwright extension cover most use cases. Browserbase is the managed cloud for running headless browsers at scale with session replay, stealth mode, and proxy rotation. The default for teams that do not want to run Playwright infrastructure.</p><p><strong>Tool registries.</strong> Foundry's tool catalog advertises roughly 1,400 tools including MCP servers, connectors, Logic Apps, and SharePoint. The biggest single catalog. OpenAI's ecosystem is MCP native now. Anthropic's Connectors directory is smaller but curated, with organization-wide skill management for Team and Enterprise. The question is no longer who has more tools. The question is whose tool permissions, auth, and audit story your compliance team will sign off on.</p><div><hr></div><h2>Context Engineering</h2><h3>Prompt Caching Is A Free Win</h3><p>Anthropic's pricing is public and aggressive.</p><p>Opus 4.6 base is 5 dollars per million input tokens. Cache write is 6.25 dollars at the 5-minute TTL or 10 dollars at the 1-hour TTL. Cache hit is 50 cents. Ten times cheaper than the base rate.</p><p>Sonnet 4.6 base is 3 dollars per million input tokens. Cache write is 3.75 or 6. Cache hit is 30 cents.</p><p>Break-even is after roughly two hits. The cache has paid for itself. Everything after that is 90 percent savings.</p><p>The 5-minute default refreshes for free on each hit. The 1-hour extended cache is for long-running agent workflows where context is stable but access is sparse. Anthropic's own contextual retrieval cost analysis of 1.02 dollars per million document tokens relies on this.</p><p>OpenAI supports automatic prompt caching for prompts over 1024 tokens at a standard 50 percent discount on cached input. Gemini offers context caching with a minimum cache size and a storage-per-hour charge. Every serious production stack now caches system prompts, tool schemas, and long document contexts. If yours does not, you are overpaying by something like 5 to 10 times on every stable prefix.</p><h3>Compression And Reinsertion</h3><p>The dominant compression patterns. Rolling summaries every N turns. Hierarchical summaries where you keep the last N turns in full plus older turns summarized. Tool-result pruning where stale tool calls are automatically removed. Anthropic's context editing reports 84 percent token reduction on 100-turn workloads using this. Selective keep based on relevance scoring.</p><p>Context reinsertion. Claude Code's pattern is now de facto standard for coding agents. Re-inject the per-project memory file plus the memory directory plus directory listings plus recently modified files at the start of every turn. Cursor, Windsurf, and Aider all follow variants.</p><h3>Context Windows And The Long Context Question</h3><p>GPT-5.4 and the 5.x family ship 1,050,000 token context with 128,000 token output on Azure Foundry. Claude Opus 4.6 and Sonnet 4.6 offer 1 million tokens for qualified customers. Gemini 3.x ships 1 million plus tokens standard across the family with some models accepting 2 million.</p><p>The 1 million token era has not killed RAG. It has killed RAG for small knowledge bases. The decision rule most teams use now:</p><p>Under 500 thousand tokens: stuff and cache. No retrieval needed.</p><p>500 thousand to 10 million tokens: hybrid. Stuff the hot data. RAG the cold.</p><p>Over 10 million tokens: RAG with contextual retrieval and reranking.</p><p>Anthropic's own guidance: if your knowledge base is smaller than 200,000 tokens or roughly 500 pages, include the entire knowledge base in the prompt with no retrieval. I have had real client debates where we deleted half a retrieval pipeline because the documents fit. The simpler answer beats the complicated one when the simpler answer works.</p><div><hr></div><h2>Evaluation</h2><h3>LLM As Judge</h3><p>Production standard but not trusted alone. Known failure modes. Position bias, which prefers the first of two candidates. Verbosity bias, where longer answers score higher. Self-preference, where GPT-4o judging GPT-4o rates itself higher than a blind comparison. Brittleness to prompt phrasing.</p><p>The mitigations are well known. Pairwise over pointwise. Calibrate with human labels. Use multiple judges and majority vote. Always pin the judge model so results are comparable across runs.</p><h3>Rubric Based Scoring</h3><p>G-Eval with chain-of-thought grading is the reference pattern, implemented in DeepEval, Ragas (RAG-specific: faithfulness, answer relevance, context precision, context recall), and Promptfoo. These remain the fastest path to getting something in CI.</p><h3>Regression Suites</h3><p>The bar has shifted. Every eval framework now integrates with CI/CD. Braintrust's "promote playground to experiment, run in CI, catch regressions before production" is representative of the whole commercial category. Foundry Evaluations integrates directly into the Agent Service lifecycle.</p><h3>Red Teaming</h3><p>UK AISI's Inspect framework is the most credible open-source evaluation harness for safety and has been adopted by multiple national AI safety institutes. Commercial options for red-team work include Haize Labs, Patronus AI, and Lakera Red.</p><h3>Tooling Landscape, April 2026</h3><p>Open source:</p><p>DeepEval has 14 plus metrics, pytest-native, good for unit-test-style evals.</p><p>Ragas is the RAG-eval default.</p><p>Giskard handles test generation and red-teaming with strong coverage on bias and reliability.</p><p>Phoenix and Arize offer OSS tracing plus eval and are now the most common choice for teams on OpenTelemetry.</p><p>Promptfoo is YAML-driven with easy CI integration and model comparison matrices.</p><p>Inspect is the rigorous choice used for publishable safety evaluations.</p><p>Commercial:</p><p>LangSmith Evals has the tightest LangChain integration and is strong for tracing plus eval in one tool.</p><p>Braintrust provides playgrounds, experiments, and online scoring. Product-led with good UI for teams that want one.</p><p>HoneyHive offers similar positioning with more enterprise feature completeness.</p><p>Pydantic Evals is code-first and minimal. Pairs with Pydantic AI.</p><p>Foundry Evaluations is native to Azure with Application Insights and RBAC integration.</p><p>Galileo is enterprise focused with hallucination detection and compliance reporting.</p><h3>Honest Take</h3><p>Eval tooling still falls short on four things.</p><p>Agent trajectory evaluation. It is easy to grade a final answer. It is hard to grade a 30-step agent loop.</p><p>Grounding drift. Judges do not reliably catch fluent but unsupported claims.</p><p>Cost of running evals. Full eval suites can exceed your training-data cost.</p><p>Test set rot. Your golden set becomes your model's memorized set over time.</p><p>Budget 15 to 25 percent of agent engineering time on eval infrastructure. That is the number I use with clients. It is more than most teams plan for, and it is the reason the teams that plan for it ship reliably.</p><div><hr></div><h2>Safety And Guardrails</h2><h3>Content Filters</h3><p>OpenAI Moderation API, free and category-scored. Azure AI Content Safety, including Jailbreak shield, Groundedness Detection, Protected Material Detection, and Indirect Prompt Attack detection. Integrated into Foundry Agent Service by default. Bedrock Guardrails with managed policies across Bedrock models and configurable denied topics plus PII filters. Gemini safety settings with four category thresholds configurable per request.</p><h3>Prompt Injection</h3><p>No technique is fully proven. The layered defense that works in practice combines five techniques.</p><p><strong>Spotlighting.</strong> Mark untrusted input with delimiters plus explicit instructions.</p><p><strong>Separate trust zones.</strong> Tool outputs and user input are not the same thing. The prompt structure should make that clear to the model.</p><p><strong>Output validation.</strong> Structured outputs plus tool-call shape checks. The output should be parseable and pass schema validation.</p><p><strong>Least-privilege tools.</strong> The agent can only do what it could do safely if fully compromised. If your agent can drop database tables, that is an architecture problem, not a security problem.</p><p><strong>Content filter pre-check on external inputs.</strong> Azure's XPIA detection in Defender for Foundry is the first shipping commercial detector specifically targeted at cross-prompt injection attacks.</p><h3>Jailbreak Detection</h3><p>Azure Defender for Foundry Tools includes XPIA detection and jailbreak classification. Anthropic's Constitutional AI underpins Claude's refusal behavior and remains the strongest published defense-in-depth against jailbreaks. Third-party options include Lakera Guard and Protect AI.</p><h3>Guardrails Frameworks</h3><p>NVIDIA NeMo Guardrails offers programmable rails through Colang with a multi-rail architecture covering input, output, retrieval, and execution. Widely adopted.</p><p>Meta Llama Guard and Prompt Guard are open-weight classifiers. The default drop-in for self-hosted stacks.</p><p>Guardrails AI (the library) plus Guardrails Hub offers a validator catalog. Strong for structured output validation.</p><p>Invariant Labs is newer but noteworthy for agent-specific trace-based policies.</p><h3>Output Validation</h3><p>Pydantic AI enforces Pydantic schemas on LLM output with automatic retry on parse failure. Cleanest API in the space. Instructor offers similar functionality with broader model support. TypeChat is Microsoft's TypeScript-first approach. OpenAI's native Structured Outputs and Anthropic's JSON mode reduce the need for these wrappers for simple cases but do not replace validation logic.</p><h3>Protected Material</h3><p>Azure Content Safety's Protected Material Detection flags verbatim copyrighted text in model output: song lyrics, news articles, recipe collections. Bedrock Guardrails includes similar capabilities. This is now a compliance checkbox rather than a differentiator.</p><div><hr></div><h2>Cost Management</h2><h3>Model Routing</h3><p>RouteLLM from Berkeley remains the open-source reference. Train a binary classifier to route between a strong and weak model. Claims 85 percent cost reduction at 95 percent GPT-4 quality on benchmarks.</p><p>AWS Bedrock Intelligent Prompt Routing, in GA since 2025, routes between same-family models like Claude Haiku versus Sonnet with target latency and cost constraints.</p><p>OpenAI tier selection through model aliases and reasoning effort controls.</p><p>Foundry model-router is a first-party model listed in the Azure catalog that selects among Azure OpenAI models automatically.</p><p>Pattern to adopt: route small model for easy tasks, large model for hard tasks, and make the routing decision observable. The savings are real. The complexity cost is also real. Add routing when you have volume, not before.</p><h3>Prompt Caching Economics, Worked</h3><p>With Opus 4.6, a 100 thousand token system prompt costs 500 dollars on first call for cache write and 50 dollars on each subsequent hit at the cache rate. Ten times cheaper. Agents with stable instructions that run hourly realize near-total savings after the first call.</p><p>Sonnet 4.6 is even steeper. 300 dollars write. 30 dollars per hit.</p><p>For a 50-turn agent loop reusing the same tools and system, prompt caching typically cuts total input cost by 70 to 90 percent. This is the single most valuable cost optimization in the stack. If you are not caching, start today.</p><h3>Semantic Caching</h3><p>GPTCache and derivatives like Upstash Semantic Cache and Helicone work well for deterministic-query workloads (FAQ bots, documentation search) and poorly for agentic workloads (too much per-request state). Hit rates of 20 to 40 percent on FAQ patterns. Single digits on agent loops. The honest answer is that semantic caching is a niche tool. Useful where it fits. Not a general solution.</p><h3>Budget Controls</h3><p>Foundry, Bedrock, and OpenAI Enterprise all ship per-project spend caps, per-user rate limits, and alerts. LangSmith, Helicone, Braintrust, and OpenMeter provide cross-provider observability. Kill switches through feature flags (LaunchDarkly, Statsig) are the norm for staged rollouts. If you do not have a kill switch for agents, you are one prompt injection from a five-figure weekend bill.</p><h3>Observability For Cost</h3><p>Every serious platform now emits OpenTelemetry with LLM-specific semantic conventions. Tokens in, tokens out, cache hit, cache miss, model, tool calls. Phoenix, Arize, Langfuse, and Helicone standardized on this. If your platform does not emit OTel LLM spans in 2026, that is a red flag.</p><div><hr></div><h2>Identity And Auth For Agents</h2><h3>The Microsoft Pattern Is The Reference</h3><p>Service-managed credentials plus on-behalf-of is now standard in Foundry Agent Service. The agent gets its own identity. When a user invokes the agent, the identity flows through OBO so downstream resources see the user's permissions, not the agent's. No shared secrets. Every call auditable. This is the right default for enterprise.</p><h3>Entra Agent Identity</h3><p>Entra now treats agents as first-class directory principals with their own object IDs, conditional access, RBAC, and lifecycle. Foundry publishes agents to the Entra Agent Registry for discoverability across Teams and Microsoft 365 Copilot. Each agent can have a dedicated Entra identity enabling secure scoped access to resources and APIs without sharing credentials. This changes your audit model fundamentally. Every action traces to the agent, the user who invoked it, the tool called, and the data accessed.</p><h3>Google And AWS Equivalents</h3><p>Vertex AI Agent Builder uses Google Cloud service accounts plus IAM. No dedicated agent principal type yet. Agentspace layers user-delegated access on top. The primitives exist. The UX around agents as a directory object is less mature than Entra's.</p><p>Bedrock AgentCore introduced agent IAM roles with session-scoped credentials and short-term credential issuance through STS. Similar functional scope to Entra. Less directory integration.</p><h3>Compliance Implications</h3><p>SOC 2, ISO 27001, HIPAA auditors are starting to expect this in 2026. You have a directory principal that performs actions. Every action is traceable. Without agent identities, you have a service account doing things on behalf of humans, which is the audit pattern nobody wants to defend.</p><p>The CTO-level decision: do not let agents run on shared service accounts past pilot. Before you ship to production, every agent has its own identity with scoped permissions.</p><div><hr></div><h2>Planning Patterns</h2><h3>ReAct Is Still The Default</h3><p>ReAct, the Reason-then-Act pattern from Yao et al. in 2022, is still the honest baseline in production. Critique is well known. Verbose, doubling token cost for thinking then acting. Brittle on complex multi-step tasks. The thought step can hallucinate plans that contradict the action taken.</p><p>Most frameworks use ReAct-shaped loops by default, often with model-native reasoning (extended thinking in Claude, reasoning effort in GPT-5.x) replacing the visible thought channel. The result is cleaner output without the "Thought:" lines while keeping the planning capability underneath.</p><h3>Tree Of Thoughts</h3><p>Use when you can cheaply evaluate partial states. Puzzles, math, code that either compiles or does not. Rarely used in production agent loops because the branching cost dominates and most production tasks lack a cheap evaluator. Useful inside specialized sub-tasks like SQL query generation or theorem proving. Not a general-purpose pattern.</p><h3>Reflexion</h3><p>Store a short self-critique from each failed attempt and re-inject on retry. Reliable, cheap, broadly applicable. Most modern agent frameworks include some form of this, explicit or folded into extended thinking.</p><h3>Task Decomposition</h3><p>Production-standard for long workflows. A planner agent emits a plan. Specialist agents execute nodes. A critic agent verifies and triggers replanning. LangGraph, AutoGen, CrewAI, and Foundry's workflow agents all support this.</p><p>Anthropic's recent "advisor strategy" is a lightweight variant. The main agent consults a stronger advisor model for hard sub-decisions without spending full Opus tokens on every turn. I like this pattern. It matches how real teams work. The junior engineer does most of the work and escalates to the senior when they need to.</p><h3>Plan Critique</h3><p>The critic-actor split works. The common footgun is the critic using the same model as the actor and agreeing with whatever the actor produced. Self-consistency bias. Mitigation: use a different model family for the critic (Claude critic for GPT actor, or the reverse), or a smaller model with explicit rubrics.</p><h3>What Is Actually Used In Production</h3><p>ReAct with native reasoning models (GPT-5.x, Claude 4.6, Gemini 3.x with thinking) covers about 80 percent of simple to moderate agents.</p><p>Hierarchical planner plus specialist executors is the standard for anything multi-hour or multi-domain.</p><p>Reflexion-style retry loops are universal, usually embedded in framework retry policies.</p><p>Tree of Thoughts, Chain of Thought with Self-Consistency, Algorithm of Thoughts, and more exotic research patterns are confined to specialized sub-tasks or absent.</p><p>The research novelty to production ratio is clear. ReAct and Reflexion have made it. Tree of Thoughts is partial. Most of the novel planning papers from 2023 to 2025 have not. Do not let your architecture lead with a research paper.</p><div><hr></div><h2>Self-Improving Agents</h2><p>The honest status. Most self-improvement patterns are still research. A few are landing in production. This is the area where the gap between the papers and the frameworks is widest. If you are hearing a pitch about agents that get better over time without human involvement, check the evidence before you believe it.</p><h3>The Three Axes Of Self-Improvement</h3><p>An agent can improve on three axes. Its knowledge, what it remembers. Its instructions, how it behaves. Its skills, what it can do. Each axis has a different maturity curve in April 2026.</p><p>Knowledge improvement is largely solved. Consolidation and reflection already do this. Memory grows, gets compacted, stays useful. Your agent knows more about each user after every session when the memory pattern is right.</p><p>Instruction improvement is the prompt optimization problem. DSPy, LangMem's prompt-optimization primitives, and several research frameworks iteratively refine system prompts based on observed failures. Honest take. These work on narrow benchmarks and rarely survive the messiness of production traffic without human oversight. For most teams, prompt updates are a human job informed by production traces. Automated prompt optimization is worth a weekend experiment. Do not bet your architecture on it yet.</p><p>Skill improvement is where the interesting work is happening, and where the gap between research and production is the most interesting to watch.</p><h3>Trajectory Distillation And Reinforcement Fine-Tuning</h3><p>The pattern. Take successful trajectories from production, grade them, and fine-tune the model on the traces. The agent gets measurably better at your specific workflow without anyone writing a new prompt.</p><p>OpenAI Reinforcement Fine-Tuning is in production for o-series and GPT-5 models with a grader-based workflow. Submit a dataset of prompts plus a grader function (code or LLM-based). OpenAI fine-tunes the model against the grader signal. Clients running RFT on a narrow workflow see 10 to 20 point gains over the base model on the target task. Not a toy.</p><p>Anthropic does not offer equivalent public fine-tuning today. Claude fine-tuning is available through AWS Bedrock but is narrower than the OpenAI path. The tradeoff is clear. If your task lives on OpenAI, RFT is a real option. If it lives on Claude or Gemini, the pattern is weaker for you in 2026 and you will likely wait for the equivalents to mature.</p><p>OpenPipe's ART library (Agent Reinforcement Trainer) is the open-source direction for teams that want to run the pattern on open-weights models. Pairs with vLLM for inference and a local eval harness.</p><p>The critical caveat. Trajectory distillation concentrates the successes you already have. It does not teach the agent what it never saw. A workflow that worked 60 percent of the time might hit 80 after distillation. It will not hit 95 without genuinely new data or a better base model. Plan accordingly, and never position distillation internally as "the model will figure out the remaining failure modes on its own."</p><h3>Skill Synthesis From Traces</h3><p>Voyager from Wang et al. in 2023 proposed an agent that writes its own skills. A curriculum generator proposes tasks. An execution agent attempts them. A skill librarian saves successful solutions as named, reusable code. Over time the library grows and the agent composes skills rather than solving from scratch.</p><p>In production, automatic skill synthesis is rare. The closest shipping pattern is human-in-the-loop skill authoring. A developer reviews production traces, identifies a recurring pattern worth encoding, and writes a skill. The Anthropic Skills open standard formalizes this. The folder is portable. The review gate is manual.</p><p>The interesting research-to-production gap. The trust boundary on auto-generated skills has not been solved. A skill is code the agent can run. An auto-generated skill is code the agent wrote and chose to run. You cannot let that into production without review. And the automation wins disappear once you add the review step. For now, treat skills as a human-authored abstraction and use traces as input to your authoring queue, not as automatic training signal.</p><h3>Metacognitive Loops Beyond Reflexion</h3><p>The active research directions. Self-refine, where the agent critiques and revises its own output before committing. Critic models, a separate smaller model trained specifically to grade the primary agent's work. Constitutional-style self-critique, where the agent checks its output against a list of explicit rules before responding.</p><p>Production status, honestly. Self-refine is a prompt pattern most teams have tried. It helps for writing and code. Mixed results on agent actions. Critic models are showing up in commercial products (Patronus AI, Braintrust online scoring, Lakera Guard, Azure Content Safety's groundedness models). These are typically small fine-tuned models scoring outputs against rubrics, and they are the most production-ready piece of the metacognition story.</p><p>Constitutional AI as a technique is internal to Anthropic's training process for Claude. As a user-facing pattern, the closest equivalents are guardrails frameworks with rule-based output validation. Functionally similar, mechanically different.</p><h3>Eval-To-Training Pipelines</h3><p>The pattern that is actually mature. Use production eval traces as training or prompt-tuning data. LangSmith and Braintrust both support promoting production examples to datasets that feed back into offline experiments. Mastra has similar hooks. Foundry Evaluations integrates with Agent Service runs.</p><p>The workflow is familiar. Production agent runs. Eval catches a regression or a low-score output. That example becomes a test case. The team revises the prompt, or fine-tunes the model, or updates a skill. The fix goes back to production. Cycle time is days to weeks. Humans in the loop at every step.</p><p>This is not fully self-improving. It is the human-in-the-loop version. It is also the only version I have seen work reliably at production scale. If you want an agent that gets better over time, build this pipeline before you chase anything more exotic. Three to five percent of engineering time on ingesting production traces back into evals and training data is the right range for teams that care about compound improvement.</p><h3>The CTO Take</h3><p>Self-improving agents as marketed do not exist yet. Self-improving agent systems, where humans close the loop on evals and distill improvements back into prompts or fine-tunes, are real and shipping now. Budget for the pipeline, not the magic.</p><p>The frontier will mature. Some of these patterns will move into the non-negotiable layer over the next year. I expect decay-aware memory, sleep-time compute, and eval-to-training pipelines to be on the CTO shortlist by April 2027. I do not expect auto-skill synthesis or fully automated prompt optimization to reach production status by then. Invest accordingly.</p><div><hr></div><h2>The CTO Shortlist</h2><p>If you are deciding what to build into your architecture today, this is the non-negotiable shortlist.</p><p><strong>Prompt caching on every stable prefix.</strong> Ten times savings on cached input. Unambiguous win.</p><p><strong>Hybrid retrieval plus contextual embeddings plus rerank.</strong> 49 to 67 percent fewer retrieval failures. Pays for itself with one avoided human escalation.</p><p><strong>Background memory consolidation.</strong> If your agents run more than 20 turns, you need this. Pick Mastra Observational Memory, LangMem, or Anthropic's memory tool based on your stack.</p><p><strong>Skills or folder-based capability packaging.</strong> An open standard now. Invest in authoring infrastructure, not bespoke RAG for skills.</p><p><strong>Agent identities with on-behalf-of.</strong> Your auditors will ask in 2026. Be ahead of them.</p><p><strong>Eval in CI. Online scoring in production.</strong> Non-negotiable for anything customer facing.</p><p><strong>Layered prompt injection defense.</strong> Spotlighting plus structured outputs plus tool least-privilege plus an XPIA classifier. No single technique is enough.</p><p>Get these seven right and your framework choice matters less than any of them. Get them wrong and no framework saves you.</p><p>The Frontier Memory Patterns and the Self-Improving Agents section earlier in this piece are the next layer. Worth tracking, worth evaluating, not yet the universal non-negotiable the seven above are. I expect two or three of them to move onto this shortlist in the next twelve months. The teams that build them early will have a quiet advantage. The teams that wait will get them for free when the frameworks catch up.</p><div><hr></div><h2>What Is Coming In Part 4</h2><p>This piece went deep on the implementation patterns. The next piece closes the series.</p><p>Part 4 is where I land. The recommendation I make to most of my enterprise clients and when I do not make it. Three client war stories across healthcare, financial services, and government. Where agentic AI is heading over the next twelve months. And a thirty minute decision framework your team can run this week.</p><div><hr></div><p><em>Navneet Singh is the founder and CEO of Webority Technologies. He builds enterprise AI systems for clients in healthcare, financial services, and government, and writes weekly about what actually works.</em></p>]]></content:encoded></item><item><title><![CDATA[The Agentic Engineering Field Guide, Part 2: The Framework and Platform Landscape]]></title><description><![CDATA[A walk through every credible option in April 2026. What each one is built for. Who it wins for. What it locks you into.]]></description><link>https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part2</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part2</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Mon, 27 Apr 2026 02:31:02 GMT</pubDate><content:encoded><![CDATA[<h2>The Three Layer Decision</h2><p>Most framework debates skip the decision that matters more. Before you pick a framework, you have to pick a layer.</p><p>There are three. From most control to least.</p><p><strong>Open framework plus your own runtime.</strong> You write the agent code in LangGraph, Microsoft Agent Framework, Mastra, or similar. You deploy it on infrastructure you own or operate. You wire in your own checkpointing, observability, and scaling. The framework does the orchestration work. Everything else is yours.</p><p><strong>Managed platform.</strong> A hyperscaler runs the agent runtime. You write code in the matching open SDK, ship a container or config, and the platform handles deployment, scaling, identity, observability, and state. Microsoft Foundry, Google Vertex AI Agent Engine, and AWS Bedrock Agents all live here. You trade some control for a lot less plumbing.</p><p><strong>SaaS agent layer.</strong> You do not write the agent. The vendor built it. You configure topics, actions, and data connectors inside their platform. Salesforce Agentforce and ServiceNow AI Agents live here. You trade most control for fastest time to value.</p><p>The rule of thumb I use with clients: pick the lowest layer at which your control requirements are met. Every layer up trades control for speed.</p><p>Your reasoning should go in this order.</p><ol><li><p>Is there a SaaS agent that already solves this? If your workflow is customer service routing inside Salesforce data or ITSM triage inside ServiceNow data, the SaaS layer probably already has an answer. Evaluate it first.</p></li><li><p>If not, does a managed platform give you enough control? If your team can live with the runtime the cloud provides and your data already lives on that cloud, the managed platform is faster than building your own runtime.</p></li><li><p>Only if the managed platform cannot meet your requirements do you go to open framework plus your own runtime. This is where differentiation happens, and where most of the engineering cost lives.</p></li></ol><p>The rest of this piece walks the three layers in that order. SaaS first. Platforms second. Open frameworks third. Then the protocols that tie them together.</p><div><hr></div><h2>Layer 1: The SaaS Agent Layer</h2><h3>Salesforce Agentforce</h3><p>Agentforce is the Agentforce 360 Platform now, rebranded in 2025. Agent Builder for low code, plus pro code extension through Apex, JavaScript, Flows, Prompt Builder, and MuleSoft connectors. Atlas Reasoning Engine is the orchestrator under the hood. Model pluggable across OpenAI, Anthropic, Google, and Salesforce's own Einstein models.</p><p>The pricing is the thing. Agentforce has the most transparent unit economics of any enterprise SaaS agent product. Flex Credits at 500 dollars per 100,000 credits. An agent action costs 20 credits or 10 cents. A voice action costs 30 credits or 15 cents. Customer facing conversations are priced at 2 dollars each on a pre-purchase plan. Agentforce User License is 5 dollars per user per month with metered usage on top. The full Sales or Service add-on is 125 dollars per user per month unmetered. The Agentforce 1 Editions start at 550 dollars per user per month with a million Flex Credits per org per year included.</p><p>A worked example from their own pricing page: 100 users doing 3 case management tasks per day, 20 working days, 6 actions per task, comes to 1,800 dollars per month for that use case. That kind of math is what makes Agentforce a buy versus build decision rather than a platform evaluation.</p><p>Where Agentforce wins: your system of record is already Salesforce, your data already lives in Data 360 (the renamed Data Cloud), and the workflow maps onto Service, Sales, SDR, or Commerce patterns. Pre built templates for all of these ship out of the box. AgentExchange is the partner marketplace for custom topics and actions.</p><p>Where Agentforce loses: you need novel multi agent topologies, your customer is not already a Salesforce shop, or you need to run the agent outside the Salesforce security perimeter. You also give up model choice in practice. Atlas uses the models Salesforce has integrated, which is a wide set but not every model.</p><p>Named enterprise customers include Workday, OpenTable, ADP, Wiley, Heathrow Airport, FedEx, and Saks Fifth Avenue. Systems integrators have dedicated Agentforce practices at every tier.</p><h3>ServiceNow AI Agents</h3><p>Three layered product on the Now Platform. Now Assist is the copilot layer, generally available across ITSM, HR, CSM, Creator Workflows, Security Operations, and Sourcing. AI Agents are autonomous, expanded significantly in the Zurich release in early 2026. AI Agent Studio is the low code builder for custom agents.</p><p>The structural advantage for ServiceNow is that agents run as first class Now Platform objects. They inherit the platform's identity, data model, and audit trail without any integration work. Flow Designer, Integration Hub, MID Server access for on-premises systems, full RBAC and ACL. For internal facing workflows where your system of record is already ServiceNow, this eliminates most of the engineering you would do in a custom build.</p><p>Model strategy is pluggable. Now LLM for common workflow tasks, Azure OpenAI and Anthropic for higher reasoning, bring your own LLM for customers with existing relationships.</p><p>Pricing is per user SKU with Pro, Pro Plus, and Enterprise tiers layered on top of existing product licences. ServiceNow has been shifting toward consumption based pricing for autonomous agents based on their 2025 earnings commentary.</p><p>Where ServiceNow wins: internal facing automations, ITSM triage, HR employee services, SOC triage, and anywhere the Now Platform is already the system of record. Time to value is measured in weeks because the connectors, audit trails, and identity are already there.</p><p>Where it loses: customer facing experiences outside the Now data model, novel multi agent topologies, anything that requires custom observability or evaluation beyond what the platform exposes.</p><p>Named customers include Adobe, Hitachi, NVIDIA (large internal deployment), BT Group, AstraZeneca, Dell, and Equinix.</p><h3>The SaaS Layer Reality</h3><p>I have talked several clients out of building their own customer service agent because Agentforce already solves 80 percent of their problem at a fraction of the cost of building it well. The same goes for ITSM workflows and ServiceNow. Buy the SaaS layer where it fits. Build only where you differentiate. That advice sounds obvious. Most teams skip it because the SaaS layer is not where interesting engineering happens. Interesting engineering is not the goal. Outcomes are.</p><div><hr></div><h2>Layer 2: The Managed Platforms</h2><h3>Microsoft Foundry plus Microsoft Agent Framework</h3><p>Microsoft Foundry is the rebrand of Azure AI Foundry that shipped at Ignite 2025. The old Hub plus OpenAI resource plus AI Services model collapsed into a single Foundry resource with projects. Assistants, Threads, Messages, and Runs became Responses, Conversations, Items, and Agent Versions under the Responses API. SDKs consolidated behind <code>azure-ai-projects</code> 2.x. The whole platform is in the middle of that naming shift. Expect procurement conversations in 2026 to include the phrase "what is this thing called now."</p><p>Three agent types ship. Prompt agents are generally available, low code, defined by instructions plus a model plus tools. Workflow agents are in preview, declarative YAML or visual designer. Hosted agents are in preview, code based, shipped as containers. Hosted agents explicitly accept MAF, LangGraph, or arbitrary code. That last detail reframes Foundry as a control plane rather than a Microsoft only runtime.</p><p>The Foundry model catalog has 1,900 plus models across foundation, reasoning, small, multimodal, domain, and industry categories. Azure Direct sold by Microsoft covers OpenAI, DeepSeek, Meta, Mistral, Cohere, NVIDIA, and Microsoft's Phi. Partners and community covers Anthropic Claude via Models as a Service, plus hundreds of Hugging Face models on managed compute. The tool catalog has 1,400 plus entries including MCP servers added directly from the portal.</p><p>Microsoft Agent Framework shipped 1.0 on April 2 for both Python and .NET. The .NET 1.1.0 landed April 10. It is the successor to AutoGen and Semantic Kernel, built by the same teams. The pairing with Foundry is the tightest in the industry. Only <code>agent-framework-foundry</code> is generally available. Every other provider package, Anthropic, Bedrock, Cosmos, AI Search, Durable Task, Azure Functions, Copilot Studio, Purview, is beta.</p><p>Identity through Entra. Every agent gets a dedicated Entra identity with RBAC scoped to the resources it needs. Entra Agent Registry catalogs the deployed agents. Defender for Foundry Tools surfaces prompt injection, jailbreak, and cross-prompt injection attack alerts. Application Insights and OpenTelemetry are built in.</p><p>Foundry Local is the quiet differentiator nobody is matching. Generally available in the 2026 wave. C#, JavaScript, Rust, Python SDKs. ONNX Runtime under the hood. OpenAI compatible API. No Azure subscription required. Runs on Windows, macOS, and Linux. Catalog includes GPT OSS, Qwen, DeepSeek, Mistral, Phi, Whisper. Same SDK patterns as cloud Foundry. Neither Vertex nor Bedrock has a first party on device counterpart with the same ergonomics. For healthcare on-premises, government air-gapped, or edge scenarios, this is the real story.</p><p>Compliance is the broadest portfolio in the cloud market. FedRAMP High via Azure Government. HIPAA with BAA. HITRUST. SOC 1, 2, 3. ISO 27001, 27017, 27018, 27701. PCI DSS. EU Data Boundary. Microsoft Cloud for Sovereignty for the EU sovereign stack. 21Vianet for China. India RBI, IRDAI, MeitY. When procurement asks for the compliance matrix, it already exists.</p><p>Limitations worth naming. Hosted agents preview does not yet support private networking, which matters for regulated scenarios. The evaluations SDK in MAF is still marked experimental. The rebrand has created documentation churn: classic portal, new portal, old service names in old tutorials. Expect confusion during Q2 2026 buying conversations.</p><h3>Google Vertex AI Agent Engine plus ADK</h3><p>Vertex AI Agent Engine is the managed agent runtime inside Vertex AI Agent Builder. The API object is still named ReasoningEngine for backward compatibility, a reminder that this product has been through two name changes.</p><p>Services inside Agent Engine, April 2026 state: Runtime is generally available, autoscaling, VPC Service Controls, configurable IAM, managed containerization. Sessions is generally available, durable per user conversation state. Memory Bank is generally available, cross session long term memory using Gemini models to generate memories, IAM Conditions support, regional ML processing. Code Execution is generally available, sandboxed code execution for agent generated code. Example Store is in preview, stores few shot examples. Quality and Evaluation is in preview, integrates the Gen AI Evaluation service and supports Gemini fine tuning for agent optimisation. Threat Detection is in preview, built into Security Command Center for attack pattern monitoring. Agent Identity is in preview.</p><p>The framework support tiers are explicit. Full integration covers ADK, LangChain, and LangGraph. Vertex AI SDK integration covers AG2 and LlamaIndex. Custom template covers CrewAI and everything else. Agent Engine runs agents speaking the A2A protocol natively. ADK itself has Python, Java, and Go SDKs, with Python the most mature.</p><p>Deployment is Terraform driven through the Agent Starter Pack. Pre built templates for ReAct, RAG, multi agent patterns, a playground UI, automated Cloud Build CI/CD, Cloud Trace and Cloud Logging wired in. Observability is Cloud Trace with OpenTelemetry, Cloud Monitoring, and Cloud Logging. Agent Engine specific dashboards surface latency, errors, token usage.</p><p>Models are any model accessible to Vertex AI. Gemini 2.x as first class. Model Garden includes Anthropic Claude Opus 4.6, Sonnet 4.6, and Haiku 4.5, Meta Llama, Mistral, and others. Non Gemini models are a first class option, not a workaround.</p><p>Compliance. HIPAA is explicitly supported. VPC Service Controls. Customer Managed Encryption Keys. Data Residency at rest. Access Transparency and Access Approval. Private Service Connect for private VPC egress. FedRAMP is covered through Google Cloud's broader FedRAMP High Assured Workloads programme.</p><p>Where Vertex wins: GCP native shops, Gemini first, Java or Go preferred languages, BigQuery data gravity, existing Vertex AI investment. The Memory Bank primitive is genuinely unique and worth studying even if you do not pick Vertex. The first party Gen AI Evaluation integration is the cleanest eval story any managed platform ships.</p><p>Where it loses: cross cloud deployments, Azure shops, and teams with zero Google footprint. The Agent Engine feature split between generally available and preview is the most complex among the three hyperscalers. Your feature selection affects your support tier.</p><h3>AWS Bedrock Agents plus Strands plus AgentCore</h3><p>AWS runs two paths in parallel and the split matters.</p><p>Bedrock Agents is the config first managed agent service, generally available. You define Action Groups as OpenAPI schemas plus Lambda functions or return of control callbacks. Knowledge Bases provide retrieval augmented generation as a service, with ingestion from S3, SharePoint, Confluence, Salesforce, or the web, and vector storage on OpenSearch Serverless, Aurora PostgreSQL pgvector, Pinecone, Redis Enterprise, MongoDB Atlas, or Neptune Analytics. Guardrails for Bedrock cover content filters, PII redaction, denied topics, word filters, and contextual grounding checks. Prompt Flows is the visual canvas orchestration tool. Multi agent collaboration is generally available, explicitly hierarchical supervisor and collaborator topology rather than a free form graph.</p><p>Strands Agents is the open, Apache 2.0 licensed agent SDK. Code first, Python only for now. Latest release is 1.35.0 on April 8, with Bedrock Service Tier control for Priority, Standard, and Flex as a unique feature. Strands is deliberately portable. You can run a Strands agent anywhere. Bedrock is the preferred deployment target but not a required one.</p><p>Bedrock AgentCore is the newer managed runtime that hosts Strands, LangGraph, and ADK agents on Bedrock infrastructure. It was announced at AWS re:Invent 2024 and exists in the Bedrock top navigation as of April 2026. Specific generally available status has been moving and is worth verifying with your AWS account team at contract time.</p><p>Models on Bedrock as of April 2026. Anthropic Claude Opus 4.6 at 5 dollars input and 25 dollars output per million tokens. Claude Sonnet 4.6 at 3 and 15. Claude Haiku 4.5 at 1 and 5. Amazon Nova family across Understanding, Creative, Speech to Speech, and Embeddings. Meta Llama 4. Mistral. Cohere Rerank 3.5. DeepSeek v3.2 at 62 cents input and 1.85 dollars output per million, which is notable. Google Gemma 3. MiniMax. Qwen. Stability AI. TwelveLabs. Writer. Z AI.</p><p>Pricing model. Agents themselves carry no separate per agent charge. You pay for underlying model tokens plus Knowledge Base and Guardrails usage. Batch inference is 50 percent discount on most models. Service tiers: Standard, Flex at 50 percent discount on best effort latency, Priority at 75 percent premium on lower latency, Reserved for capacity commitment.</p><p>Compliance. HIPAA BAA eligible. SOC 1, 2, 3. PCI DSS. ISO 27001, 27017, 27018. Bedrock is available in AWS GovCloud with FedRAMP High, which is the primary pathway for U.S. federal agencies running Anthropic workloads. Regional availability covers all the major AWS regions plus the new European Sovereign region.</p><p>Where AWS wins: AWS native shops, existing Bedrock investment, Claude as the preferred model family with FedRAMP High coverage, strict latency SLAs (Service Tiers are real), and mixed model fleets with strong DeepSeek or Llama economics.</p><p>Where it loses: Azure native shops, GCP native shops, and teams that need a true graph orchestration framework rather than hierarchical supervisor patterns. The Bedrock Agents config model is less flexible than AF's graph or LangGraph's Python code.</p><h3>Anthropic Developer Platform</h3><p>Anthropic's platform is the exception to the hyperscaler pattern. There is no Anthropic managed agent runtime. The SDK is the story. Claude runs on the Messages API plus tools, on Bedrock AgentCore, or on Vertex Agent Engine, whichever managed runtime you prefer. This is a deliberate positioning choice. Anthropic focuses its own engineering on models, the SDK, and safety. It leans on AWS and Google for managed deployment.</p><p>Model family April 2026, verified on platform.claude.com. Claude Opus 4.6 has 1 million token context, 128k output, 5 dollars input and 25 dollars output per million. Claude Sonnet 4.6 has 1 million token context, 64k output, 3 and 15 dollars. Claude Haiku 4.5 has 200k context, 64k output, 1 and 5 dollars. Extended thinking is supported across all 4.x models. Adaptive thinking is Opus and Sonnet only. Haiku 3 retires April 19.</p><p>Opus 4.6 and Sonnet 4.6 support 300k output tokens via the Batches API with the <code>output-300k-2026-03-24</code> beta header. That is a material change for long report generation workflows.</p><p>Platform capabilities beyond the Messages API. Batches API at 50 percent discount. Prompt caching, with cache writes at roughly 1.25 times the base input rate and cache reads at roughly 10 percent of base. Files API for persistent cross request storage. Computer Use is still beta with a new zoom action on Opus 4.6, Sonnet 4.6, and Opus 4.5. Tool primitives include bash, text editor, and custom tools. MCP is first class, both on Claude.ai and the API.</p><p>Enterprise offerings. Claude for Enterprise provides SSO, audit logs, and fine grained access controls. Claude for Government is the dedicated product line for US national security customers, deployed in classified environments. Compliance certifications commonly cited include SOC 2 Type 2, ISO 27001, ISO 42001, HIPAA BAA through AWS Bedrock or GCP Vertex, and FedRAMP High via AWS GovCloud.</p><p>Notable customers from Anthropic press and partner announcements include Lyft, Snowflake, Notion, Pfizer, Quora, Robinhood, Asana, Zoom, LexisNexis, Intuit, Palo Alto Networks, and Palantir. The high profile 2025 announcement was Palantir plus Anthropic plus AWS for classified U.S. government workloads.</p><p>Where Anthropic wins: teams that want the best current model for agentic work, minimum vendor lock in, and the flexibility to run on any cloud's managed runtime. The Claude Agent SDK gives you the mature tool loop from Claude Code if you are building developer tools.</p><p>Where it loses: if you want a single vendor managed story end to end, you cannot get it from Anthropic alone. You pair them with a hyperscaler runtime.</p><div><hr></div><h2>Layer 3: The Open Frameworks</h2><p>The platforms above are where production deployments land. The frameworks below are where the code is written. Some frameworks pair cleanly with a specific platform. Others run anywhere.</p><h3>LangGraph plus LangSmith</h3><p>The open cross cloud winner. Python and TypeScript near parity. The most mature graph semantics in the space. LangGraph 1.1.6 is the current stable. LangChain itself has repositioned as the high level wrapper built on LangGraph. 28,990 GitHub stars, largest ecosystem, trusted by Klarna, Replit, and Elastic per their own README.</p><p>State management is the strongest story in the field. <code>langgraph-checkpoint-postgres</code> for production durability, plus SQLite, Redis, and in memory checkpointers for lighter scenarios. Durable execution is the headline feature. Human in the loop through <code>interrupt()</code> and <code>Command(resume=...)</code>. State can be inspected and modified mid flight.</p><p>LangSmith is the flagship tracing and eval companion. Battle tested in production. The coupling is tight, which is a benefit and a tax. Production grade observability without LangSmith requires your own OTel pipeline work.</p><p>Where it wins: Python first multi cloud shops, graph oriented orchestration needs, teams with the ops maturity to run checkpointers and LangSmith. Hosted Agents on Foundry explicitly accept LangGraph. Vertex Agent Engine has LangGraph as a full integration tier.</p><p>Where it loses: .NET shops (TypeScript support exists but Python is first class), procurement contexts where open source plus SaaS observability is a harder sell than a hyperscaler contract, and single cloud shops where the hyperscaler's own platform is the easier path.</p><h3>CrewAI</h3><p>The "team of agents" metaphor, 48,643 GitHub stars, Python only. Two architectural modes: Crews for autonomous role playing agents, Flows for event driven single LLM call precision. CrewAI AMP Suite is the enterprise bundle with tracing, Control Plane, and on-premises or cloud deployment.</p><p>CrewAI is the fastest path to a multi agent proof of concept. The role, goal, and backstory metaphor maps onto a slide deck and a demo in hours. For prototyping and validating the idea, it is hard to beat.</p><p>Where it wins: role based automations (research, sales, operations), teams building "a team of agents" products, and proof of concept speed.</p><p>Where it loses: anywhere you need graph orchestration, enterprise procurement where open source plus AMP Suite pricing is a harder sell, and production systems where the looser orchestration becomes a constraint.</p><h3>Pydantic AI</h3><p>Best static typing story in the field, from the Pydantic team. Python only. 1.80.0 is the current stable. Capabilities, Agent Specs in YAML or JSON, server side compaction capabilities for OpenAI and Anthropic shipped recently. Pydantic Logfire is the companion observability product, OTel based.</p><p>Durable execution through DBOS and Temporal style backends. Human in the loop with per tool approval that can be conditional on call arguments, conversation history, or user preferences. MCP, A2A, and AG-UI all integrated natively.</p><p>Where it wins: teams already using Pydantic or FastAPI, type safety as a design priority, novel approaches like YAML agent specs for code free deployment, and openness about where compaction and caching happen.</p><p>Where it loses: anywhere graph support is central, since graph is not the primary pattern. TypeScript and .NET shops.</p><h3>Mastra</h3><p>TypeScript first, from the team behind Gatsby. 22,906 stars. Y Combinator W25. Currently the only serious TypeScript option with graph workflows, MCP server authoring, and suspend and resume. Dual license with Apache 2.0 core and enterprise license for specific modules.</p><p>Where it wins: TypeScript and Next.js product teams, Node backend shops, teams shipping AI features into existing web apps.</p><p>Where it loses: non TypeScript stacks, enterprise contexts where the YC stage still matters for procurement.</p><h3>OpenAI Agents SDK</h3><p>Pre 1.0 after a year of public development. Version 0.13.6 as of April 2026. Python plus a separate TypeScript SDK. Provider agnostic. Primitives are Agent, Runner, Handoffs, Tools, Guardrails, Sessions, and Tracing. Realtime Agents for voice with gpt-realtime-1.5 are a differentiator.</p><p>Where it wins: teams already on the OpenAI Responses API who want minimum ceremony, voice agent builders.</p><p>Where it loses: anywhere you need durable execution or graph orchestration. The SDK is explicitly lightweight, not a production workflow engine.</p><h3>Claude Agent SDK</h3><p>Pre 1.0, Python, wrapping the Claude Code CLI. Built specifically to give developers programmatic access to the agent loop that powers Claude Code. Release cadence is near daily.</p><p>Where it wins: coding agents, internal developer tools, anything that wants the mature Read, Write, Edit, Bash tool ergonomics from Claude Code without rebuilding them.</p><p>Where it loses: multi agent orchestration, non coding use cases, production systems that need stability guarantees from a pre 1.0 SDK.</p><div><hr></div><h2>The Protocols That Tie It All Together</h2><h3>Model Context Protocol</h3><p>MCP is the de facto standard for tool and context integration as of April 2026. Current spec revision is 2025-11-25. Every non legacy framework in this guide supports MCP natively: Claude Agent SDK, Microsoft Agent Framework, Google ADK, Pydantic AI, Mastra (bidirectional, consume and author), OpenAI Agents SDK, Strands Agents, CrewAI through adapters, Semantic Kernel.</p><p>Practical implication: you can write your tool integrations once as MCP servers and call them from any framework. That changes the economics of framework choice. The lock in cost is lower than it looks.</p><h3>Agent to Agent Protocol</h3><p>A2A reached 1.0.0 on March 12, 2026, under Linux Foundation governance. The spec refactor separated application protocol from transport bindings, modernised OAuth 2.0 to remove implicit and password flows and add device code and PKCE, added multi tenancy via gRPC scope fields, and shipped <code>tasks/list</code> with filtering and pagination.</p><p>Adoption is narrower than MCP but growing. Microsoft Agent Framework advertises cross runtime interoperability via A2A. Google ADK has A2ATransport as a default supported transport. Vertex Agent Engine runs agents speaking the A2A protocol natively. Pydantic AI has A2A integration. For cross framework, cross cloud, cross team agent interoperability, A2A is where to bet.</p><h3>The Protocol Bet</h3><p>A bet on frameworks is a snapshot of one moment. A bet on protocols is durable. Design your agent system to speak MCP and A2A fluently. Your tools, your inter agent messages, and your external integrations all go through standardised protocols. The underlying framework becomes swappable. That is the architecture I recommend to every client planning a production build this year.</p><div><hr></div><h2>Lock In Analysis</h2><p>What is hardest to migrate away from, in order:</p><p>Agentforce and ServiceNow are hardest. Your agents are objects in someone else's metadata model. Migration means rebuild.</p><p>Bedrock Agents config first is next. Action Groups, Knowledge Bases, and Guardrails are AWS native objects. The Strands SDK path deliberately reduces this because Strands agents can move off Bedrock.</p><p>Vertex Agent Engine is similar. Sessions, Memory Bank, and Example Store are Google native. ADK itself is open and portable. The surrounding services are not.</p><p>Microsoft Foundry is similar. MAF SDK is open. The Foundry runtime, tool ecosystem, and Entra Agent Registry are not.</p><p>Open SDK plus your own runtime is the lowest lock in to infrastructure. You are still locked to the SDK's abstractions, which means a framework change is a rewrite, but the infrastructure is yours.</p><p>What is practically sticky across all layers is your prompts, evals, and tool schemas. These are portable in theory and rarely in practice. Teams underestimate how much implicit behaviour is encoded in prompt tuning for a specific orchestrator.</p><div><hr></div><h2>The Migration Test</h2><p>Before committing to any layer, pick one agent. Build it twice. Once on the SaaS layer or managed platform you are considering. Once on an open SDK deployed to your own runtime. Measure four things.</p><p>Time to first production deployment.</p><p>Per conversation cost at ten times your current volume.</p><p>Evaluation score against your golden dataset.</p><p>Time to add a new tool, specifically a customer specific integration your vendor does not ship.</p><p>The answers will not match what the vendor decks suggested. They rarely do. The difference between what the decks say and what the numbers show is the single most valuable piece of evidence you can bring to a platform selection meeting.</p><div><hr></div><h2>What Is Coming in Part 3</h2><p>This piece mapped the layers and named the options. The next piece goes into what you build inside whatever layer you pick.</p><p>Part 3 covers the building blocks. Memory patterns. RAG patterns including agentic, graph, and contextual retrieval. Tools and capabilities beyond MCP including computer use and code interpreters. Context engineering and prompt caching economics. Evaluation frameworks. Safety and guardrails. Cost management. Identity and authentication. Planning patterns.</p><p>These are the patterns every production agent build hits regardless of framework. Get them right and your architecture compounds. Get them wrong and you are rebuilding in six months.</p><div><hr></div><p><em>Navneet Singh is the founder and CEO of Webority Technologies. He builds enterprise AI systems for clients in healthcare, financial services, and government, and writes weekly about what actually works.</em></p>]]></content:encoded></item><item><title><![CDATA[The Agentic Engineering Field Guide, Part 1: How I Evaluate Agent Frameworks]]></title><description><![CDATA[Six questions every production system must answer, the orchestration patterns you will actually use, and the readiness checklist I run with every client.]]></description><link>https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part1</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/the-agentic-engineering-field-guide-part1</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Fri, 24 Apr 2026 07:28:38 GMT</pubDate><content:encoded><![CDATA[<h2>Why I Am Writing This Series</h2><p>Agentic AI went from research demos to production systems in eighteen months. Faster than microservices. Faster than containers. Faster than the mobile shift for enterprise. The consequence is that most engineering teams are picking agent frameworks the way people used to pick JavaScript frameworks in 2015. You commit to one. Three months later you realise it does not answer your actual production problems. You rewrite. That rewrite costs six to twelve months. Some of my clients are on their third framework. A few are on their fourth.</p><p>This series is the guide I wish I had eighteen months ago. It is not a product comparison. It is the mental model I use when a client asks me which framework to bet on, what questions to ask, what to worry about, and where this is all heading.</p><p>One note before we start. I build mostly on the Microsoft stack. My client base is healthcare, financial services, and government, most of them .NET heavy and Azure native. That shapes the view in this series. Where other stacks win, I say so. Where I land on Microsoft Agent Framework plus Microsoft Foundry, the reasoning is in Part 4. Read the whole thing for the balanced view. Read Part 4 for my pick.</p><p>Four parts.</p><p><strong>Part 1 (this piece)</strong> is about the frame. The six questions every production agent system must answer before you touch a framework. The orchestration patterns you will actually use. The production readiness checklist.</p><p><strong>Part 2</strong> walks the landscape. Microsoft Foundry plus Agent Framework. Google Vertex plus ADK. AWS Bedrock plus Strands. Anthropic, OpenAI, LangGraph, CrewAI, Pydantic AI, Mastra. Protocols. Plus the enterprise SaaS agent layer (Agentforce, ServiceNow) because your buyers will ask about it.</p><p><strong>Part 3</strong> goes into the building blocks. Memory. RAG. Tools. Context engineering. Safety. Cost. Evaluation. Identity. The patterns every production build hits regardless of framework.</p><p><strong>Part 4</strong> is where I land and why. The explicit recommendation for my typical client. When I do not pick it. Three war stories across different stacks. Where this is all heading. And a thirty minute CTO decision framework you can run with your team this week.</p><p>If you bookmark this, I will update it every quarter. The frameworks churn. The questions do not.</p><div><hr></div><h2>The Six Questions Every Production Agent System Must Answer</h2><p>Start with the questions. Frameworks are answers to questions. If you pick an answer before you have written down the question, you will pick wrong. I ask every client these six questions before we pick a stack. In that order.</p><h3>1. How do you manage state across long running workflows?</h3><p>Agents are not stateless. A real workflow runs for minutes. Sometimes hours. Sometimes days. State is the conversation history, the intermediate tool outputs, the decisions already made, the files already generated, the approval statuses from earlier in the flow. If your state lives in memory, your workflow dies when the process restarts. If your state lives in a flat key value store, you cannot branch, merge, or rewind.</p><p>The production answer is durable, typed, serializable state that survives process restarts. Ideally, state you can inspect with a debugger and modify if needed.</p><p><strong>Failure mode when you get this wrong:</strong> you cannot recover from a failure halfway through a long workflow. You cannot reproduce a decision three days later when a user disputes it. You cannot run your agent on Azure Functions or AWS Lambda because your state assumes a long lived process.</p><h3>2. How do you recover from partial failures?</h3><p>Real workflows fail. APIs time out. LLMs return malformed JSON. Networks partition. Rate limits hit. A production agent system does not restart from the top when step nine of twelve fails. It resumes from the last known good state.</p><p>This is where the checkpointing story matters. Every framework claims to handle failure. Not all of them actually do. Ask to see the code that runs when a step fails. If there is no checkpointing, there is no recovery. If checkpoints serialize only the happy path, they will not survive a malformed intermediate output.</p><p><strong>Failure mode when you get this wrong:</strong> your costs scale with your failure rate. You burn tokens re running the first eight steps of every failed workflow. Results diverge on retry because temperature is not zero. Customer-facing outputs become inconsistent for identical inputs. The client services team ends up explaining to the lawyer why today's contract summary differs from yesterday's for the same document.</p><h3>3. Where does a human approve before writes happen?</h3><p>The single most important architectural decision in enterprise agentic AI. Where is the gate between "the agent has decided what to do" and "the agent has done it?"</p><p>If you have no gate, you cannot ship to a regulated client. You cannot ship to a client whose legal team has seen an agent make a mistake. You cannot ship to most enterprises at all.</p><p>The gate has to be durable. Nobody approves a contract in the same millisecond the agent generated it. The approval arrives three hours later, from a different person, on a different machine, possibly after the original workflow process has died. The framework has to hold that pause. In my experience, this is the feature where most frameworks either shine or quietly fail. The difference is whether the pause is an in-memory await (dies on restart) or a durable suspend (survives weeks if needed).</p><p><strong>Failure mode when you get this wrong:</strong> you ship write operations before human review. Either nothing gets approved because the workflow dies while waiting, or the agent writes something catastrophic and you spend a quarter explaining it to compliance.</p><h3>4. How do you observe, debug, and audit agent decisions?</h3><p>Every agent decision will be questioned eventually. By a user. By a compliance officer. By a regulator. By your own engineering team during the post mortem. If you cannot reconstruct why an agent chose a particular path, you have an audit problem and a debugging problem at the same time.</p><p>What you need: structured traces with inputs, outputs, tool calls, prompts, and timing. Exportable. Queryable. Tied to workflow runs, not just LLM calls. Retention that meets your compliance requirements. Ideally, the ability to replay a workflow from a captured trace.</p><p>This is the area where most frameworks are weakest. The base tracing is usually OpenTelemetry compatible, which is good. The production layer on top, where you actually query and alert and audit, almost always requires a second tool. LangSmith. Braintrust. Langfuse. Foundry Observability. Pydantic Logfire. Budget for one of these from day one.</p><p><strong>Failure mode when you get this wrong:</strong> a client asks why the agent made a specific decision. You have no answer. The compliance officer asks for an audit trail for the last ninety days. You have log files with free text that cannot be queried. Your engineering team guesses at why a production regression happened.</p><h3>5. How do you test systems with non deterministic components?</h3><p>Agent systems are non deterministic. Traditional unit tests do not work cleanly. You need evaluations, not just assertions. Rubric based scoring. Regression suites that compare behaviour across model versions. A way to simulate failure modes at specific workflow steps. An LLM-as-judge harness for open ended outputs. Red team tests for prompt injection and jailbreak attempts.</p><p>This is where the maturity of the ecosystem matters. Evaluation frameworks exist. Most are young. The integration between agent frameworks and eval tooling is uneven. I have seen teams ship to production with no regression suite because the eval story was too painful to build. Then a model provider bumps a minor version and the agent's accuracy silently drops ten points. Nobody notices for two weeks.</p><p><strong>Failure mode when you get this wrong:</strong> you ship to production with no way to know if a model upgrade broke your workflow. You cannot defend accuracy numbers to a client. You are testing manually by running the agent and reading the outputs, which does not scale past four people.</p><h3>6. How do you compose specialists versus run generalists?</h3><p>The question most teams get wrong. A single agent with many tools feels simpler. Until the tool count exceeds twenty. Until a single prompt has to accommodate ten different use cases. Until you need to give different teams ownership of different capabilities.</p><p>Multi agent composition is not always the answer. Sometimes one agent with good tool design is better. The question is when to split, when to stay monolithic, and what the cost of composition is. Every handoff between agents adds latency, context loss, and failure modes. Every specialist adds a new prompt to maintain. Every graph edge adds a routing decision that can go wrong.</p><p>Graph based orchestration frameworks give you the escape valve when the single agent model runs out. Prompt-only frameworks do not. If you expect your system to grow in scope, you need the graph option available even if you do not use it on day one.</p><p><strong>Failure mode when you get this wrong:</strong> your agent works for six weeks. Then as you add features, response quality collapses. Latency climbs. Prompt length becomes unmanageable. You cannot onboard a new team onto the agent without teaching them the entire system. You end up rewriting as a multi agent graph under time pressure, which is the worst time to do it.</p><div><hr></div><h2>The Orchestration Patterns You Will Actually Use</h2><p>Regardless of framework, these are the patterns. The names vary by vendor. The shapes repeat. Every production build I do combines two or three of these in a single workflow.</p><p><strong>Sequential.</strong> Agents run one after another. Output of agent one becomes input to agent two. Useful when the process is linear and the order matters. Example: a due diligence workflow where you first extract entities from a document, then look them up in a registry, then generate a summary.</p><p><strong>Concurrent.</strong> Agents run in parallel on the same input. Results get aggregated. Useful when you want multiple independent perspectives. Example: four agents each reviewing a legal clause for a different risk (compliance, commercial, IP, operational). Aggregated into a single risk summary. Faster than sequential because the agents do not wait for each other. More expensive because you pay for all branches whether you use the output or not.</p><p><strong>Hand off.</strong> One agent decides which specialist to route to next based on context. Useful for triage patterns. Example: customer service routing. A front line agent reads the request, decides if it is billing, technical, or account access, routes to the right specialist. The routing decision itself is an LLM call with a constrained output. This is where framework maturity matters. In immature frameworks the routing agent hallucinates a specialist that does not exist and you discover it in production.</p><p><strong>Hierarchical.</strong> A manager agent delegates to workers. Workers report back. The manager composes results and decides what to do with partial results. Similar to concurrent but with explicit supervision. Example: code review pipelines where a reviewer agent delegates to style, security, and test coverage specialists, then composes the review comments into a single PR review.</p><p><strong>Magentic or dynamic planning.</strong> The orchestrator maintains a shared task ledger, delegates, observes results, and re plans. Useful for open ended problems where the right sequence of steps cannot be determined upfront. Example: research tasks. "Figure out the compliance posture of this company" is not a fixed sequence. It is a loop of searches, reads, cross checks, and synthesis. Magentic patterns are powerful and expensive. Use them only when the problem genuinely needs dynamic planning. Most problems do not.</p><p><strong>Event driven.</strong> Agents react to events from external systems rather than being driven by a single entry point workflow. Useful when the agent sits inside a larger event driven architecture. Example: an agent that monitors a support queue, picks up tickets matching a pattern, processes them, publishes results back. This is not a replacement for the other patterns. It is a harness around them.</p><p>The framework question becomes: does my framework let me compose these patterns, or does it lock me into one model? This is where graph based frameworks pull ahead of purely hierarchical ones. If you want to build a hand off inside a hierarchical flow inside an event driven harness, you need a framework that treats the graph as the primary abstraction.</p><div><hr></div><h2>The Production Readiness Checklist</h2><p>Before you ship, walk through this list. If you cannot answer yes to all of it, you are not shipping a product. You are shipping a demo with uptime. I run this with every client in the week before go live.</p><p><strong>State</strong>
- State is serialized and durable across process restarts
- State schema is versioned so you can migrate between deployments
- You can inspect, modify, and re run from any point in the workflow</p><p><strong>Failure recovery</strong>
- Individual step failures resume from the last good checkpoint
- Tool timeout and retry behaviour is configurable per step
- You can kill and restart the entire workflow engine without losing in-flight work</p><p><strong>Approval gates</strong>
- Human approval is a durable pause, not an in memory await
- Approval notifications go through your real systems (email, Slack, queue)
- Gate timeouts have defined behaviour (auto reject, auto escalate, notify)</p><p><strong>Observability</strong>
- Every agent decision is traced with inputs, outputs, prompts, tool calls, timing
- Traces are queryable by workflow run and by user session
- Trace retention meets your compliance requirements
- You can replay a workflow from a trace</p><p><strong>Evaluation</strong>
- You have a regression suite that runs before every deployment
- You can detect behaviour drift across model upgrades
- You have rubric based scoring for open ended outputs
- You have a red team suite for prompt injection and jailbreak</p><p><strong>Cost</strong>
- You know the token cost per workflow run, not just per call
- You have budgets that halt runs that exceed thresholds
- You can route to cheaper models for easy subtasks
- You have prompt caching enabled where the provider supports it</p><p><strong>Compliance</strong>
- Data residency is enforced at the framework level, not just the model provider
- You can explain any agent decision to a regulator
- Sensitive data is redacted before it reaches external providers
- You have an audit log that is separate from your application logs</p><p><strong>Rollback</strong>
- You can roll back a prompt change without a full redeploy
- You can pin model versions
- You can A/B test prompts and agent configurations in production</p><p>If you build this checklist into your architecture from the start, framework choice matters less. If you do not, no framework saves you. I have watched teams with the best framework in the space fail in production because they skipped the checklist. I have watched teams with a mediocre framework ship reliably because they built the checklist in from day one.</p><p>The checklist is the thing. The framework is the accelerator.</p><div><hr></div><h2>What Is Coming in the Rest of the Series</h2><p>The rest of this series maps the landscape against the questions.</p><p><strong>Part 2</strong> covers frameworks and platforms. The sharper mental model is that every hyperscaler now has a two layer story. An open SDK on the bottom (the framework). A managed platform on top (the platform). Microsoft has Agent Framework and Foundry. Google has ADK and Vertex. AWS has Strands and Bedrock. Anthropic has the Claude Agent SDK and the Claude developer platform. LangGraph plus LangSmith is the credible open source version of the same story. The decision that comes before framework choice is framework versus platform. Part 2 covers all of it.</p><p><strong>Part 3</strong> goes into the building blocks you will use inside whatever framework you pick. Memory patterns, the ones that work and the ones that look good on slides but fail in production. RAG patterns, classic and agentic and graph based. Tool patterns beyond MCP. Context engineering, including prompt caching economics. Evaluation frameworks. Safety and guardrails. Cost management. Identity and auth for agents. This is the implementation reality every CTO needs to plan for.</p><p><strong>Part 4</strong> is where I land. The recommendation I make to most of my enterprise clients. The explicit "when I do not pick it" caveats. Three client war stories across different stacks. Where agentic AI is heading over the next twelve months. And a thirty minute decision framework you can run with your team.</p><p>If you are evaluating a stack for a production build and want a second pair of eyes before you commit, reply to this email or find me on LinkedIn. I read every reply. I will also note which parts of this guide readers push back on the hardest. Those become the sections I rewrite in the quarterly update.</p><div><hr></div><p><em>Navneet Singh is the founder and CEO of Webority Technologies. He builds enterprise AI systems for clients in healthcare, financial services, and government, and writes weekly about what actually works.</em></p>]]></content:encoded></item><item><title><![CDATA[Advanced Claude Code Techniques: Managing Context, Sessions, and Token Efficiency]]></title><description><![CDATA[Fourteen tactics that cut my token usage in half for the same work.]]></description><link>https://blog.navneetsingh.name/p/advanced-claude-code-techniques</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/advanced-claude-code-techniques</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Sat, 18 Apr 2026 09:47:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CI7h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You already know the basics. You write slash commands, you wire up tools, you let the model edit files. And yet your sessions are bleeding tokens. A ten-minute task somehow swallows 400K tokens, and you hit a rate limit before lunch. The model didn&#8217;t get worse. Your context got fat.</p><p>Every section below is a problem, a tactic, and a tradeoff. Nothing else.</p><div><hr></div><h2>1. The core mechanic: why context is the bottleneck</h2><p>The model is <strong>stateless</strong>. There is no memory on the server. Every single turn, every keystroke you send, every tool call the model makes, the client repackages the entire conversation so far and re-sends it. System prompt, all tool schemas, every user message, every assistant message, every tool result. All of it. Every turn.</p><p>The 1M-token context window is forgiving, and that&#8217;s the problem. You never get the &#8220;context full&#8221; signal that would force you to clean up. You just get a steadily rising bill and, eventually, a rate-limit slap.</p><p><strong>Prompt caching softens the blow but doesn&#8217;t fix it.</strong> Anthropic&#8217;s prompt cache is a server-side optimization that stores the prefix of a request, with a default TTL of about 5 minutes (a 1-hour option exists for an extra cache-write premium). When your next turn starts with the exact same bytes as the cached prefix, you skip re-processing and pay a cache-read rate of roughly 10% of input cost. The model is still stateless. The cache is just a network and compute shortcut for repeated prefixes. It doesn&#8217;t remember anything. A few things to know:</p><ul><li><p>The cache works on the entire request prefix, including system prompt, tool definitions, prior assistant messages, and tool results. Not just user reads.</p></li><li><p>Any Edit to a file the model already read breaks the cache from that point forward. The tool result for that Read now contains different bytes, and everything after it re-bills at full rate.</p></li><li><p>Pause for more than 5 minutes (coffee, meeting, lunch) and the default cache evaporates. Your next turn pays full price for the whole conversation. The 1-hour TTL is worth setting on long sessions if your client supports it.</p></li><li><p>Cache doesn&#8217;t shrink the conversation. You still pay output tokens for every response, and the uncached portion after any change gets billed in full.</p></li></ul><p><strong>The math of tool bloat.</strong> A single Read on a 500-line file is roughly 15-25K tokens (line numbers add bulk). A Grep across a large repo with <code>output_mode: "content"</code> and no <code>head_limit</code> can easily return 30K+ tokens. A screenshot from Chrome DevTools MCP comes back as base64. A 100KB PNG inflates to about 135KB of text, which on Claude&#8217;s tokenizer comes out around 35K tokens when the screenshot is inlined as text content. (Images sent through the proper vision endpoint are billed by image size, not base64 expansion. Different math.) Ten of those text-blob screenshots and you&#8217;ve burned 350K tokens on pictures. The conversation doesn&#8217;t forget any of it. Every subsequent turn re-sends all of it.</p><p>The model&#8217;s intelligence is fixed per turn. The cost is determined by what you put in front of it. That&#8217;s the whole game.</p><div><hr></div><h2>2. Context hygiene tactics (per-turn wins)</h2><p>These are the cheap wins. Do them reflexively.</p><h3>Never re-Read a file already in context</h3><p>If a file appeared in the conversation this session, whether through Read, a Grep with <code>-C</code>, or a tool&#8217;s output, it&#8217;s still there. Scroll up mentally. Don&#8217;t re-read it.</p><p>Claude Code now tracks file state and will often warn you when you re-read. The discipline still has to be yours. The common anti-pattern: reading a file, editing it, then re-reading the whole thing to &#8220;verify.&#8221; The edit tool already errors if the change didn&#8217;t apply cleanly. Re-reading a 600-line file to confirm a 3-line change is an 18K-token mistake, and I&#8217;ve watched myself make it more times than I want to admit.</p><h3>Scoped reads beat full-file dumps</h3><p>Before you Read a big file, Grep for the symbol you care about. Then Read with <code>offset</code> and <code>limit</code> around the hit.</p><pre><code><code># Bad: reads all 1,200 lines of the controller
Read(file_path="...OrderController.cs")

# Good: find the method, read only the window you need
Grep(pattern="ProcessRefund", path="...OrderController.cs", -n=true)
Read(file_path="...OrderController.cs", offset=340, limit=80)
</code></code></pre><p>A 1,200-line file is roughly 30K tokens. An 80-line window is roughly 2K. Do this 20 times in a session and you&#8217;ve saved half a million tokens.</p><h3>Stop using Bash for file operations</h3><p>Never <code>cat</code>, <code>head</code>, <code>tail</code>, <code>find</code>, <code>ls -R</code>, <code>grep</code>, or <code>rg</code> from the Bash tool. Use Read, Glob, and Grep.</p><p>Bash output is unstructured text that the model has to re-parse. The dedicated tools are optimized. Grep uses ripgrep internally with sensible defaults. Glob returns sorted paths. Read adds line numbers the model can reference in follow-up Edit calls. Bash <code>find .</code> on a node_modules-adjacent tree can dump 50K+ tokens of garbage.</p><p>The only time to shell out for file ops is when you need something structurally impossible otherwise, like <code>git log --stat</code> for change history.</p><h3>Budget your screenshots</h3><p>Treat browser and Figma screenshots as expensive. Take one, do the work, don&#8217;t take another unless state changed.</p><p>Chrome DevTools MCP screenshots run 80-150KB of PNG data before base64 inflation. Figma <code>get_screenshot</code> is similar. If you&#8217;re iterating on a UI fix and take a screenshot after every edit, you&#8217;re paying tens of thousands of tokens per iteration just to look at the page. Make the full change, then screenshot once. If you need to inspect a specific element, use <code>get_page_text</code> or the DOM tools. They&#8217;re a fraction of the size.</p><h3>Quiet your build and test output</h3><p>Configure your build commands for minimum output. Verbose logs are context poison.</p><pre><code><code># .NET
dotnet build -v q --nologo
dotnet test --verbosity quiet --nologo

# Node
npm ci --silent
npm run build -- --silent
pnpm install --reporter=silent

# Python
pytest -q --no-header
</code></code></pre><p>A noisy <code>dotnet build</code> emits 8-15K tokens of per-project spam nobody reads. Quiet mode drops it to a few hundred. Same story for <code>npm install</code> pulling down 600 packages with progress bars.</p><p>If a build fails, re-run verbose. Don&#8217;t run verbose by default.</p><div><hr></div><h2>3. Session boundary management (the hard problem)</h2><p>This is the section most people skip and then wonder why they&#8217;re out of tokens at 2pm.</p><h3>The reality</h3><p>Sessions don&#8217;t have clean endings. You&#8217;re not going to finish one discrete task, run <code>/clear</code>, and start the next. Real work drifts. You start investigating a bug, end up reading unrelated code for context, fix the bug, then pivot to a related refactor, then someone asks about the deployment. By hour three, your context is 80% sediment. Tool results from three tangents ago that nobody needs anymore.</p><p>The goal isn&#8217;t clean sessions. The goal is to shed context aggressively when topics shift.</p><h3>Four tools, four use cases</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CI7h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CI7h!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 424w, https://substackcdn.com/image/fetch/$s_!CI7h!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 848w, https://substackcdn.com/image/fetch/$s_!CI7h!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 1272w, https://substackcdn.com/image/fetch/$s_!CI7h!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CI7h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png" width="1080" height="412" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39266042-1e79-4616-b0b0-b965af006957_1080x412.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:412,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:49631,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.navneetsingh.name/i/194159348?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CI7h!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 424w, https://substackcdn.com/image/fetch/$s_!CI7h!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 848w, https://substackcdn.com/image/fetch/$s_!CI7h!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 1272w, https://substackcdn.com/image/fetch/$s_!CI7h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39266042-1e79-4616-b0b0-b965af006957_1080x412.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Tool What it does When to use <code>/clear</code> Wipes conversation history. Clean slate. Starting a genuinely different task. Previous context has no value to the next step. <code>/compact</code> Summarizes conversation so far into a short blob; keeps working state. Mid-task when context is bloated but you still need continuity. <code>/rewind</code> (Esc-Esc) Restores to a prior prompt; you choose files only, conversation only, or both. You went down the wrong path two turns ago and want to back up without losing earlier work. Handoff (lifecycle) Write key state to a timestamped file under <code>./.claude/handoffs/</code>, then <code>/clear</code>. Between phases of long work, especially with multiple threads in flight, where you want deterministic continuity instead of a model-generated summary.</p><p><code>/rewind</code> is newer and underused. It auto-checkpoints before every Edit/Write call (note: Bash-modified files are NOT tracked). Picking &#8220;restore both&#8221; actually forks the session, so you can branch and explore. Combined with git commits, you have two layers of undo: <code>/rewind</code> for fine-grained tool-level steps, <code>git checkout</code> for code-level rollback.</p><h3><code>/compact</code> is the underused middle ground</h3><p>Most people treat <code>/compact</code> as automatic. &#8220;It&#8217;ll happen when I hit the limit.&#8221; Use it deliberately, with instructions.</p><pre><code><code>/compact Keep the database schema we worked out and the list of files changed. Drop all the exploratory reads and the Stack Overflow tangent.
</code></code></pre><p>The instruction steers what survives. Without instructions, you get a generic summary that may discard exactly the thing you needed. The token cost of <code>/compact</code> is real because it does a full-context read to produce the summary. But the next 20 turns operate on a fraction of the prior bulk, which is the whole point.</p><h3>Tasks: persistent state inside a session</h3><p><code>TaskCreate</code>, <code>TaskList</code>, <code>TaskUpdate</code>, <code>TaskGet</code>. Tasks are file-backed work items that survive <code>/clear</code> and can be read by parallel subagents. Earlier versions called these &#8220;Todos&#8221; and they vanished with the session. Tasks now persist, support <code>addBlockedBy</code> / <code>addBlocks</code> dependency chains, and can coordinate across worktrees via <code>CLAUDE_CODE_TASK_LIST_ID</code>.</p><p>Use them when a piece of work has 3+ stages, when you want a subagent to pick up where you left off, or when you genuinely want progress visible across <code>/clear</code> boundaries. Don&#8217;t use them for trivial single-step work.</p><h3>The handoff lifecycle (not just a note)</h3><p>When you&#8217;ve hit a natural phase boundary, write the essential state to disk, then clear.</p><p>The naive version is one file: write <code>./HANDOFF.md</code>, <code>/clear</code>, read it in the next session. That works exactly until the moment you pause feature A to fix urgent bug B. Now B&#8217;s handoff overwrites A&#8217;s, and when you come back to A next week you&#8217;ve got nothing. Writing the note is easy. Managing handoffs over time is the real problem. Multiple concurrent threads, detecting when a handoff has gone stale, archiving the ones that are done.</p><p>Plenty of people solve the single-file problem. Fewer solve the lifecycle. What I built, running daily in production now, is a directory of handoffs, three custom slash commands, and staleness detection driven by git reachability. None of it ships with Claude Code. You wire it up yourself.</p><h4>Location</h4><pre><code><code>./.claude/handoffs/
  2026-04-13T01-07-42Z_auth-refactor.md
  2026-04-12T15-30-00Z_deploy-debugging.md
  archive/
    2026-04-10T09-00-00Z_feature-x-done.md
</code></code></pre><p>Per-repo, local-only, gitignored. Handoffs reference uncommitted working-tree state tied to one machine. They have no business being synced or committed. If the information is worth sharing across machines, that&#8217;s what git commits are for.</p><h4>File header: the lifecycle anchor</h4><p>Every handoff starts with a YAML frontmatter block:</p><pre><code><code>---
created: 2026-04-13T01:07:42Z
topic: auth-refactor
branch: development
head_commit: abc1234
uncommitted_files: 3
status: active
---
</code></code></pre><p><code>head_commit</code> is the hook that makes staleness detection possible. If that commit no longer exists (rebased away, branch force-pushed), the handoff is almost certainly pointing at code that isn&#8217;t there anymore. If current HEAD is 50+ commits ahead of it, the world has moved on.</p><h4>Three custom slash commands do the whole lifecycle</h4><p><code>/handoff</code> writes a new one. - Captures branch, HEAD commit, uncommitted file count into the frontmatter. - Prompts for a topic slug (<code>auth-refactor</code>, not <code>handoff-1</code>). - Writes <code>./.claude/handoffs/&lt;timestamp&gt;_&lt;slug&gt;.md</code>. - Adds <code>.claude/handoffs/</code> to <code>.gitignore</code> on first run. - Recommends <code>/clear</code> when done.</p><p><code>/pickup</code> picks up an old one. - Lists active handoffs newest-first: topic, age, branch, whether the <code>head_commit</code> is still reachable. - Auto-picks if there&#8217;s only one active. Otherwise you choose. - Surfaces staleness warnings before handing you the content. - Moves the file to <code>archive/</code> after you&#8217;ve read it, so the same handoff doesn&#8217;t get picked up twice.</p><p><code>/handoff-prune</code> does cleanup, typically run at session start. - Auto-archives handoffs older than 14 days. - Auto-archives any whose <code>head_commit</code> no longer exists or whose branch was deleted. - Flags (but doesn&#8217;t auto-archive) when current HEAD is 50+ commits ahead, or when the topic slug shows up in recent commit messages. Both signal the work probably landed. - Deletes files in <code>archive/</code> older than 90 days.</p><h4>Staleness rules at a glance</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wwHu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wwHu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 424w, https://substackcdn.com/image/fetch/$s_!wwHu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 848w, https://substackcdn.com/image/fetch/$s_!wwHu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 1272w, https://substackcdn.com/image/fetch/$s_!wwHu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wwHu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png" width="1080" height="396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e80b7661-310b-412e-9bac-e180cabead1f_1080x396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:396,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31248,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.navneetsingh.name/i/194159348?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wwHu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 424w, https://substackcdn.com/image/fetch/$s_!wwHu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 848w, https://substackcdn.com/image/fetch/$s_!wwHu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 1272w, https://substackcdn.com/image/fetch/$s_!wwHu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe80b7661-310b-412e-9bac-e180cabead1f_1080x396.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Signal Action Age &gt;14 days Auto-archive <code>head_commit</code> no longer exists Auto-archive Branch deleted Auto-archive HEAD &gt;50 commits ahead Warn on pickup, offer archive Topic slug appears in recent commits Warn on pickup (likely completed) Archive file &gt;90 days old Delete</p><h4>Why this beats the single-file version</h4><p>Concurrent threads stop stepping on each other. Pause feature A, <code>/handoff</code>. Get pulled into bug B, <code>/handoff</code> again. Two files in <code>active/</code>, neither overwritten. <code>/pickup</code> lets you choose which one to continue.</p><p>Stale handoffs self-destruct. The prune logic runs at session start, so last month&#8217;s abandoned debugging note doesn&#8217;t sit around pretending to be live context.</p><p>You get a short-term audit trail. <code>archive/</code> holds recently-completed work for a window, and when you catch yourself thinking &#8220;how did I approach this last time?&#8221;, the answer is often still on disk.</p><p>It stays local. Handoffs belong to the machine where the uncommitted work lives. Anything worth propagating across machines gets committed.</p><h4>Anti-patterns</h4><p>Don&#8217;t commit handoffs. They reference uncommitted local state. Gitignore them on day one.</p><p>Don&#8217;t skip the slug. <code>handoff-1</code> tells you nothing a week later. <code>auth-token-migration</code> tells you exactly what you were in the middle of.</p><p>Don&#8217;t resume stale blindly. The staleness warnings are there because force-pushes and rebases happen. If the handoff points at a commit that no longer exists, trust the warning over the note.</p><p>Don&#8217;t treat handoffs as documentation. If a fact is worth keeping past two weeks, it belongs in memory, a project doc, or a commit message. Not in an ephemeral handoff file.</p><p>This beats <code>/compact</code> when you want control over what carries forward. You wrote the note, so you know what&#8217;s in it. A model-generated summary can quietly lose the one critical fact you needed.</p><h3>Git commits as natural checkpoints</h3><p>Commit at every logical boundary, not at the end of the session.</p><p>An uncommitted working tree is a reason not to <code>/clear</code>. The model needs the context to keep its work coherent. A committed working tree is freedom. The code is safe, the state is in git, and the next session can <code>git log</code> its way back to orientation in 2K tokens instead of re-reading everything.</p><p>The anti-pattern is hoarding 15 changes into one big commit at end of day. You&#8217;ve now locked yourself into one giant session for the whole day&#8217;s work, because clearing means losing context the model needs to finish.</p><h3>Parallel sessions for genuinely different tasks</h3><p>If you&#8217;re working on two unrelated things, open two Claude Code instances.</p><p>One terminal for the backend refactor. Another for the email template tweak. Neither pollutes the other. When you <code>/clear</code> in one, the other is untouched. Don&#8217;t try to multiplex unrelated work in a single session. The shared context is pure overhead for both.</p><h3><code>/resume</code> is your safety net</h3><p><code>/clear</code> is not permanent. <code>/resume</code> can pull back prior sessions on the same machine (sessions persist as JSONL under <code>~/.claude/projects/</code>). This should make you more willing to clear, not less. If clearing turns out to be premature, you haven&#8217;t lost anything. You&#8217;ve just paid for a cleaner workspace.</p><h3>The mental model</h3><p>Stop thinking of context as &#8220;the conversation.&#8221; Think of it as the minimum state needed to produce the next correct action. Most of what&#8217;s in your context right now isn&#8217;t minimum state. It&#8217;s sediment.</p><div><hr></div><h2>4. Subagent delegation (biggest lever for long sessions)</h2><p>If you take one architectural idea from this article, take this one.</p><h3>Why subagents are the single biggest win</h3><p>When you spawn a subagent, it runs with its own separate context. It does the searches, reads the files, runs the tools. Then it returns a summary, usually a few hundred to a few thousand tokens. All the tool noise stays in the subagent&#8217;s context and vanishes when the subagent finishes.</p><p>Your main session sees a task dispatch and a short report. Not the 50 files the subagent read to produce that report.</p><h3>When to reach for a subagent</h3><p><strong>Broad codebase search.</strong> &#8220;Find every place we handle refund state transitions.&#8221; A grep-read-grep-read loop across 30 files is a context disaster inline. Perfect subagent work.</p><p><strong>Log scans.</strong> &#8220;Check the last 500 lines of Application Insights for errors in the checkout flow.&#8221; The subagent can pull, grep, and summarize. You see a one-paragraph digest.</p><p><strong>Multi-file exploration.</strong> &#8220;Trace how <code>OrderId</code> flows from the API layer down to the database.&#8221; Ten files opened, one summary out.</p><p><strong>Any large read.</strong> A 2,000-line generated client file you need three things from. Subagent.</p><h3>Specialized vs general-purpose subagents</h3><p>A general-purpose subagent works for most exploration. For repeated flows, define specialized agents with tighter system prompts, restricted tools, and domain knowledge baked in. A <code>sql-analyst</code> that already knows your schema. A <code>deployment-checker</code> that knows your Azure setup. These run faster and produce tighter summaries because they don&#8217;t need orientation.</p><h3>How to define a specialized agent</h3><p>Agents are markdown files with YAML frontmatter at <code>~/.claude/agents/&lt;name&gt;.md</code> (global) or <code>./.claude/agents/&lt;name&gt;.md</code> (per-project). A definition has a name, description, model preference (usually Haiku or Sonnet), tool restrictions, and a system prompt. The description is what the main model reads when deciding whether to dispatch, so be specific. Tool restrictions are load-bearing. A log scanner doesn&#8217;t need Edit or Write.</p><p>Example <code>~/.claude/agents/log-scanner.md</code>:</p><pre><code><code>---
name: log-scanner
description: Scans Application Insights and Azure Log Analytics for specific
  error patterns. Returns concise summaries.
model: haiku
tools: [Bash, Grep]
---

You are a log-scanning specialist. Given a time window and search pattern:

1. Query the logs with `az monitor app-insights query` or equivalent.
2. Filter for the pattern, group by severity.
3. Return a one-paragraph summary with counts and top 3 most relevant messages.
4. Do NOT dump full log lines unless specifically asked.
5. If a query would return &gt;500 lines, sample instead of returning all.
</code></code></pre><p>When is it worth defining one? If you&#8217;ve done a similar scan/query/check more than three times, turn it into an agent. Below three, general-purpose is fine. Above, the specialized agent pays for itself in tighter summaries and faster turnaround, and the definition doubles as documentation for future-you.</p><h3>Background agents for long operations</h3><p>Use <code>run_in_background: true</code> on Bash calls that take more than a few seconds.</p><pre><code><code>Bash(command="dotnet publish -c Release -o ./publish", run_in_background=true)
</code></code></pre><p>You get a process handle back immediately, continue working, and get a notification when it finishes. Otherwise you&#8217;re blocking the conversation on a 90-second build. Same logic for <code>terraform apply</code>, long test runs, <code>az webapp deployment</code>, <code>npm run build</code> on a big Next.js app.</p><h3>Worktree isolation for risky experiments</h3><p>For subagent work that might break things (mass refactors, dependency upgrades, schema migrations), run the subagent in an isolated git worktree. The main branch stays clean. Pass <code>isolation: "worktree"</code> in the subagent invocation, or launch a parent session with <code>claude --worktree &lt;name&gt;</code>. Either way you get a separate filesystem and branch. If the experiment works, merge. If it doesn&#8217;t, nuke the worktree.</p><div><hr></div><h2>5. Memory system for cross-session continuity</h2><p>Memory is for things you want to persist beyond the current session without re-teaching them.</p><h3>What belongs in memory</h3><p>Stable facts. &#8220;The staging DB connection string lives in Key Vault secret <code>db-staging-cs</code>.&#8221; Doesn&#8217;t change often.</p><p>Incident learnings. &#8220;Last time we deployed to prod on a Friday, the Redis connection pool exhausted. Don&#8217;t do Friday deploys.&#8221;</p><p>User preferences. &#8220;Always use <code>DateTimeOffset</code> not <code>DateTime</code>.&#8221; These also belong in CLAUDE.md, but memory is better for context-dependent preferences.</p><h3>What does NOT belong in memory</h3><p>Transient state. &#8220;We&#8217;re currently debugging the refund bug.&#8221; That&#8217;s session state; use a handoff note.</p><p>Things that change. &#8220;The current version is 1.4.2.&#8221; It won&#8217;t be in three weeks.</p><p>Large documents. Memory is not a file system. Keep entries short and indexable.</p><h3>Where it lives</h3><p>Memory files live under <code>~/.claude/projects/&lt;project-dir&gt;/memory/</code>. Plain markdown, one file per entry:</p><pre><code><code>~/.claude/projects/webority-lps-web/memory/
  MEMORY.md
  user_role.md
  feedback_friday_deploys.md
  project_auth_rewrite.md
  reference_grafana_oncall.md
</code></code></pre><p>Filename prefixes mirror the four types I use: <strong>User</strong> (preferences), <strong>Feedback</strong> (corrections from prior sessions), <strong>Project</strong> (codebase-specific), <strong>Reference</strong> (pointers to docs, runbooks). This is a personal taxonomy on top of Claude Code&#8217;s memory layer; the underlying system also recognizes managed-policy and project-rules files at higher precedence, so check the docs before adopting these names verbatim.</p><h3>Anatomy of a memory file</h3><p>Short. YAML frontmatter for metadata. Structured so the model can apply the rule without reading the whole story:</p><pre><code><code>---
name: Production deploys must be on weekdays
description: Hard rule, never deploy to prod on Friday afternoon
type: feedback
---

Production deploys must be completed by 2pm on weekdays only.

**Why:** Last two Friday deploys had Redis connection-pool issues that weren't
caught until Monday. Team lost 6 hours of weekend debugging.

**How to apply:** If the user proposes a prod deploy after 2pm any weekday or
any time on Friday, pause and ask for explicit confirmation with reasoning.
</code></code></pre><p>One-sentence rule, Why anchored to a real incident (so future-you won&#8217;t delete it casually), How-to-apply spelling out the trigger.</p><h3>MEMORY.md as the index</h3><p>Without an index, the model has no cheap way to know what&#8217;s there. A working MEMORY.md:</p><pre><code><code>- [User role](user_role.md): senior .NET architect, primary stack Azure Functions
- [No Friday deploys](feedback_friday_deploys.md): hard rule, past incident
- [Auth middleware rewrite](project_auth_rewrite.md): compliance-driven, Q2 goal
- [Grafana oncall dashboard](reference_grafana_oncall.md): pointer for request-path debugging
</code></code></pre><p>Title plus a one-phrase reason-for-existing. The model scans the index in a few hundred tokens and reads only relevant files. Prune stale entries. Resist letting it grow past a screenful.</p><h3>Anti-patterns specific to memory</h3><p>Ephemeral task state. &#8220;We&#8217;re fixing the refund bug&#8221; is active work, that&#8217;s a handoff.</p><p>Facts that change. Shelf life under a month, don&#8217;t persist.</p><p>Full documents. Memory is an index to knowledge, not a container.</p><p>Redundant with CLAUDE.md. Don&#8217;t duplicate. You&#8217;ll double-bill and eventually update one and forget the other.</p><div><hr></div><h2>6. CLAUDE.md hierarchy and discipline</h2><p>CLAUDE.md is loaded into every session&#8217;s system context. Every line costs you tokens on every turn, forever.</p><h3>Levels</h3><p><strong>Global</strong> (<code>~/.claude/CLAUDE.md</code>) applies to every project. Keep this tight.</p><p><strong>Project</strong> (<code>./CLAUDE.md</code> at repo root) applies to this codebase only.</p><p><strong>Managed</strong> policies and drop-ins exist for enterprise installs and override user-level files. Most solo developers never touch them, but if you&#8217;re on a managed workstation, your CLAUDE.md may not be the highest-priority instruction set.</p><p>Push project-specific rules down. If a rule only matters for one repo, it doesn&#8217;t belong in global. A global CLAUDE.md that mentions specific database schemas or specific Azure subscriptions is bloat for every other project.</p><h3>Ruthless pruning</h3><p>Read your CLAUDE.md and for each line ask: does this change model behavior in a way I can observe? If not, delete it.</p><p>Common bloat:</p><ul><li><p>Aspirational principles (&#8221;write clean code&#8221;) that don&#8217;t steer any specific decision.</p></li><li><p>Redundancy with well-known conventions. You don&#8217;t need to tell the model what SOLID is.</p></li><li><p>Rules the model already follows by default.</p></li></ul><p>A 400-line global CLAUDE.md is maybe 8K tokens added to every turn of every session. That&#8217;s not free.</p><h3>Enforceable vs unenforceable rules</h3><p>Some rules prose can enforce. &#8220;Use <code>DateOnly</code> for dates&#8221; works because the model reads it naturally and does it. Others prose cannot. &#8220;Never run <code>rm -rf</code> without confirming&#8221; is the kind of thing the model can forget under pressure. Unenforceable rules belong in <code>settings.json</code> as deny rules or hooks (next section).</p><h3>Syncing global CLAUDE.md across machines</h3><p>If you use Claude Code on multiple machines, you need a sync story. A simple one: keep CLAUDE.md in a GitHub gist and pull it at session start.</p><pre><code><code># In global CLAUDE.md:
# At session start: gh gist view &lt;id&gt; -f CLAUDE.md
# Compare last-sync timestamps, pull if remote is newer
</code></code></pre><p>Pair this with a SessionStart hook that runs the fetch automatically. Done once, works forever.</p><div><hr></div><h2>7. Deterministic enforcement via settings.json</h2><p>Prose is probabilistic. Hooks and permissions are deterministic. If a rule absolutely must not be broken, don&#8217;t write it in CLAUDE.md. Put it in <code>settings.json</code>.</p><h3>Deny rules for destructive or wasteful commands</h3><pre><code><code>{
  "permissions": {
    "deny": [
      "Bash(rm -rf *)",
      "Bash(git push --force*)",
      "Bash(find /*)",
      "Bash(cat *)",
      "Bash(grep *)"
    ]
  }
}
</code></code></pre><p>The last three deny the <code>cat</code>/<code>grep</code>/<code>find</code> anti-patterns from section 2 at the enforcement layer. The model can&#8217;t bypass them under any prompt. Effective against both the model&#8217;s bad habits and your own when you&#8217;re tired.</p><p>A caveat the docs themselves call out: Bash pattern matching is naive. A determined adversary or a confused model can sometimes bypass <code>Bash(rm -rf *)</code> via subshells, env-var expansion, or quoting tricks. Treat Bash deny rules as friction against everyday mistakes, not as a true security boundary. For real isolation, use sandboxed execution or filesystem-level write protection.</p><h3>Start narrow. Aggressive denies have false positives</h3><p>Those aggressive patterns block legitimate work. <code>Bash(cat *)</code> kills <code>cat file | jq</code> pipes. <code>Bash(grep *)</code> kills <code>git log --oneline | grep fix</code> and every <code>| grep</code> pipeline. <code>Bash(find /*)</code> is narrow (root-rooted only), but people often widen it to <code>Bash(find *)</code>, which kills <code>find . -name '*.cs'</code> traversal.</p><p>Start with rules for things purely destructive or wasteful, observe friction for a week, then narrow. Safer starting point:</p><pre><code><code>"deny": [
  "Read(**/.env*)",
  "Read(**/*secret*)",
  "Read(**/*.pem)",
  "Bash(rm -rf /*)",
  "Bash(git push --force*)",
  "Bash(*Compress-Archive*)"
]
</code></code></pre><p><code>Bash(rm -rf /*)</code> blocks root wipes. <code>Bash(rm -rf *)</code> also blocks <code>rm -rf node_modules</code> and <code>rm -rf ./publish</code>, which are legitimate cleanups. Write the narrow pattern, not the scary-looking one.</p><h3>The full hook surface</h3><p>The hook system has grown well past <code>SessionStart</code> and <code>PostToolUse</code>. The full set worth knowing:</p><ul><li><p><code>SessionStart</code> (with <code>matcher</code> of <code>startup</code>/<code>resume</code>/<code>clear</code>): sync configs, fetch credentials.</p></li><li><p><code>UserPromptSubmit</code>: stdout gets injected into the conversation. Use this to inject git status, current time in IST, or a small runbook every turn.</p></li><li><p><code>PreToolUse</code> / <code>PostToolUse</code> / <code>PostToolUseFailure</code>: gate or react to tool calls. Auto-format on Edit, deny shell access for certain commands, log on failure.</p></li><li><p><code>Stop</code> / <code>SubagentStop</code>: fire when the model finishes. Trigger a build, ping a notifier, archive a transcript.</p></li><li><p><code>PreCompact</code> / <code>PostCompact</code>: archive the full transcript before auto-compaction destroys it.</p></li><li><p><code>SessionEnd</code>, <code>Notification</code>, <code>PermissionRequest</code>, <code>TaskCreated</code>, <code>FileChanged</code>, <code>WorktreeCreate</code>: niche but useful in specific automation flows.</p></li></ul><p>A full list lives in the Claude Code docs. The two I underuse and now wish I&#8217;d wired up earlier: <code>UserPromptSubmit</code> for ambient context injection, and <code>PreCompact</code> for archival.</p><h3>SessionStart hook for auto-sync</h3><pre><code><code>{
  "hooks": {
    "SessionStart": [
      {
        "command": "gh gist view af524f... -f CLAUDE.md &gt; ~/.claude/CLAUDE.md.remote &amp;&amp; &lt;compare and replace logic&gt;"
      }
    ]
  }
}
</code></code></pre><p>Runs before the first turn. User doesn&#8217;t have to remember to sync. Verify the exact schema in your version&#8217;s docs; matcher and field names evolve.</p><h3>PostToolUse hook for auto-format</h3><blockquote><p><em>Illustrative pseudo-code. Hook schema, matcher syntax, and substitution variables (like </em><code>$file_path</code><em>) vary between versions. Verify against your release notes before wiring up.</em></p></blockquote><pre><code><code>{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit",
        "command": "prettier --write $file_path"
      }
    ]
  }
}
</code></code></pre><p>The model doesn&#8217;t have to remember to format. The format just happens.</p><h3>When to prefer hooks over prose</h3><p>Behavior that must be 100% reliable (safety, compliance, formatting).</p><p>Behavior the model tends to forget under context pressure.</p><p>Behavior that&#8217;s cheap to automate but expensive to repeat in prose.</p><p>Prose is still right for nuanced guidance like &#8220;prefer composition over inheritance.&#8221; Hooks are right for mechanical rules.</p><div><hr></div><h2>8. MCP server diet</h2><p>Every MCP server you have connected loads its tool schemas into your system prompt on every turn. A Figma server with 15 tools, a Chrome server with 20, a Gmail server with 8. That&#8217;s 40+ tool schemas, each with parameter descriptions, easily 10-20K tokens just sitting there in case you need them.</p><h3>Audit regularly</h3><pre><code><code>claude mcp list
</code></code></pre><p>For each server, ask: did I use this in the last two weeks? If no, disconnect.</p><h3>Common offenders</h3><p>Canva, Gamma. Connected once to try them, never used again.</p><p>Gmail. Connected for one task, now hanging around.</p><p>Notion, Linear, Jira. Huge schemas, only useful in specific workflows.</p><p>Disconnect them. Reconnect when you need them. It takes 30 seconds.</p><h3>Local vs claude.ai-registered servers</h3><p>Servers registered on claude.ai propagate everywhere you use Claude. Servers configured locally only affect the current machine. For personal tools, prefer local. It keeps your global footprint smaller.</p><h3>Deferred tool loading (first-class token win)</h3><p>On supported versions, tool names and short descriptions sit in the system prompt, but full JSON schemas (parameters, descriptions, enums) only load when the model actually calls a tool, typically via a <code>ToolSearch</code> mechanism fetching on demand.</p><p>Why it matters. A Chrome DevTools MCP with 25 tools and full schemas weighs ~15K tokens per turn. Deferred loading turns that into ~2K of names plus an on-demand fetch. Across three or four MCPs, the difference between a 40K-token and 6K-token system prompt, every turn.</p><p>When it&#8217;s available. Check your version. Some enable it automatically, some need a flag, some don&#8217;t support it. Worth upgrading for.</p><p>The tradeoff. A small round-trip the first time the model needs an unloaded tool. A few hundred extra tokens and a bit of latency for that call. Against 10K+ tokens saved per turn, obvious win.</p><p>Relation to the MCP diet. Not a license to keep every MCP ever installed. Loaded names still cost. Not 15K, but not zero. Priority: disconnect unused &gt; defer loaded &gt; keep-loaded.</p><div><hr></div><h2>9. Model routing</h2><p>Different tasks deserve different models. Running Opus for a one-line typo fix is waste. Running Haiku to architect a system is malpractice.</p><h3>Rough allocation</h3><p><strong>Opus 4.7</strong> (<code>claude-opus-4-7</code>) for planning, architecture, ambiguous requirements, multi-step reasoning, &#8220;figure out why this is broken.&#8221; Best quality reasoning, highest cost.</p><p><strong>Sonnet 4.6</strong> (<code>claude-sonnet-4-6</code>) for implementation from a clear plan, writing code, editing files, running tests. The workhorse. You&#8217;ll use it most.</p><p><strong>Haiku 4.5</strong> (<code>claude-haiku-4-5</code>) for lookups, simple file reads, log scanning, &#8220;what&#8217;s the current time in IST,&#8221; renaming a variable, scanning through hundreds of log lines. Fast and cheap.</p><h3>Setting the default and switching</h3><p>Launch with an explicit model. <code>claude --model haiku</code> for grep-heavy exploration, <code>claude --model sonnet</code> for normal coding, <code>claude --model opus</code> for planning or hard debugging. Defaulting to Sonnet and explicitly upgrading to Opus avoids paying Opus rates for a session you never needed to.</p><p>Mid-session (syntax varies): <code>/model &lt;name&gt;</code> if supported, otherwise handoff + <code>/clear</code> and relaunch. Don&#8217;t flip casually. Switches can reset cached prefix state. Pick a phase (plan / build / verify), set the model, switch at boundaries.</p><h3>Per-subagent model selection</h3><p>The bigger win than switching the main session is selecting a cheaper model for subagents. An agent that scans logs, searches code, or summarizes a report doesn&#8217;t need Opus-level reasoning. Your main Sonnet thread pays Sonnet rates for a short summary instead of Opus rates for 20K tokens of log noise. Set <code>model: haiku</code> (or <code>sonnet</code>) in the agent&#8217;s frontmatter.</p><h3>Cost math (current pricing)</h3><p>Per million input tokens, the 4.x generation is roughly: Opus 4.7 ~$5, Sonnet 4.6 ~$3, Haiku 4.5 ~$1. Output tokens cost 5x the input rate at each tier. So Opus is roughly 1.7x Sonnet and 5x Haiku on input cost. Much narrower than the older Opus 3 / 4.1 generation when Opus was 5x Sonnet and 15x Haiku. The relative gap has tightened considerably. Always check current Anthropic pricing before optimizing aggressively, because these numbers move.</p><p>Operating rule: never use an expensive model for work where the answer is smaller than the inputs. Bulk-read-then-summarize is Haiku. Sonnet for structured code. Opus when reasoning is the work.</p><div><hr></div><h2>10. Visibility tools</h2><p>You can&#8217;t manage what you can&#8217;t see.</p><h3><code>/context</code></h3><p>Shows your current context usage. Use it. Before you take a screenshot or do a big read, glance at where you are. At 30% you&#8217;re fine. At 75% maybe delegate or compact before the expensive operation.</p><h3>Custom status line</h3><p>Claude Code supports custom status lines. Put current context usage on it so you see it every turn.</p><blockquote><p><em>Version-dependent example. The variable names below (</em><code>CLAUDE_CONTEXT_PERCENT</code><em>, </em><code>CLAUDE_MODEL</code><em>) are illustrative. The actual contract (env vars, stdin JSON, or a state file) varies between Claude Code versions. Check your release notes or </em><code>claude --help</code><em>.</em></p></blockquote><pre><code><code>{
  "statusLine": {
    "command": "echo \"ctx: ${CLAUDE_CONTEXT_PERCENT}%  model: ${CLAUDE_MODEL}\""
  }
}
</code></code></pre><p>More portable: have the status-line command shell out to a small script that reads whatever your version exposes. When the contract changes, you update one script instead of editing JSON.</p><p>The principle matters more than the syntax. If you can see context usage every turn, you&#8217;ll act on it. If you can&#8217;t, you won&#8217;t.</p><h3>Why visibility changes behavior</h3><p>It&#8217;s the speedometer effect. You drive differently when you can see your speed. You use Claude Code differently when you can see that you&#8217;re at 60% context three turns into a task.</p><div><hr></div><h2>11. Skills, slash commands, and plugins</h2><p>Three flavors of model-extending markdown. Worth understanding the differences.</p><h3>Slash commands: user-invoked recipes</h3><p><code>~/.claude/commands/*.md</code> for global, <code>./.claude/commands/*.md</code> for project-specific. The filename (without <code>.md</code>) becomes the slash command name. A slash command runs only when you type it.</p><pre><code><code>---
description: Write a handoff note capturing current work state so the user can /clear and resume cleanly
---

Write a new handoff file capturing the state of the current work thread.

Steps:
1. Gather context: current branch, HEAD commit short SHA, uncommitted file count.
2. Ensure `./.claude/handoffs/` exists and is gitignored.
3. Prompt the user for a kebab-case topic slug.
4. Write `./.claude/handoffs/&lt;UTC-timestamp&gt;_&lt;slug&gt;.md` with YAML frontmatter and body sections.
5. Keep total under 400 words.
6. Recommend `/clear` to the user.
</code></code></pre><p>The <code>description</code> field is what Claude Code shows in the command palette and what the model reads when deciding whether the command is relevant. First-class, not decoration.</p><h3>Skills: model-invoked capabilities</h3><p>Skills live in <code>~/.claude/skills/&lt;name&gt;/SKILL.md</code> (or per-project equivalent). Same markdown + YAML structure, but the key difference is auto-invocation. With <code>user-invocable: true</code> they behave like slash commands. With <code>user-invocable: false</code> they&#8217;re background knowledge the model can pull in when relevant, without you typing anything.</p><pre><code><code>---
name: research
description: Multi-source topic research across HN, Reddit, RSS, Twitter, blogs
user-invocable: true
---
</code></code></pre><p>The right mental model: a slash command is a button the user presses. A skill is a tool the model knows it has. Both are markdown files; the lifecycle is what differs. Anthropic ships first-party skills (<code>/simplify</code>, <code>/loop</code>, <code>/claude-api</code>) and there&#8217;s a growing third-party ecosystem.</p><p>Skills also support live reloading. Drop a new <code>SKILL.md</code> into the directory and the next turn picks it up. No restart.</p><h3>Plugins: bundled distribution</h3><p>A plugin packages skills + agents + hooks + slash commands into one installable unit. Manage them with <code>/plugin</code>. Install with <code>/plugin install &lt;name&gt;@&lt;marketplace&gt;</code>. Useful when you want to share a workflow across a team without copy-pasting markdown files into every machine.</p><p>For solo work, raw skills and slash commands are usually enough. Plugins matter when you have 5+ teammates who all need the same setup.</p><h3>Discipline</h3><p>Don&#8217;t create a slash command or skill for a flow you might need. Create it when you&#8217;ve done the flow manually three times and it&#8217;s clearly sticking.</p><h3>Example: <code>/deploy-backend</code> slash command</h3><pre><code><code>1. Run dotnet build -c Release -v q --nologo; stop on error.
2. Publish to ./publish (clean first).
3. Zip ./publish using System.IO.Compression.ZipFile (fastest).
4. Deploy with az functionapp deployment source config-zip.
5. Restart the function app.
6. Check app state with az functionapp show --query state.
</code></code></pre><p>Beats re-typing the sequence or watching the model reinvent it from memory every time.</p><h3>Example: <code>/ist</code> skill</h3><pre><code><code>Run: date -u "+%Y-%m-%d %H:%M:%SZ" and convert to IST (UTC+5:30).
Report as: DD-MMM-YYYY HH:MM IST.
</code></code></pre><p>Silly but useful. I invoke it 20 times a week.</p><div><hr></div><h2>12. Going headless and autonomous</h2><p>The interactive TUI is one mode. Claude Code also runs headless, scriptable, and on a schedule. This is where it stops being a coding assistant and becomes a worker.</p><h3>Headless mode: <code>claude -p</code></h3><pre><code><code>claude -p "Find all TODO comments older than 30 days and summarize" \
  --allowedTools "Read,Grep,Bash" \
  --output-format stream-json
</code></code></pre><p>Prints to stdout, no TUI, no interactive loop. <code>--output-format json</code> gives you structured output. <code>--output-format stream-json</code> emits NDJSON for real-time piping. Combine with <code>--json-schema</code> to enforce a response shape.</p><p>This is how you embed Claude Code in CI: pre-commit hooks, PR review bots, scheduled audits. The same agent loop, the same tool system, no terminal.</p><h3>Agent SDK (Python and TypeScript)</h3><p>If you want to embed deeper than CLI piping, the Agent SDK exposes the agent loop, context manager, tool registration, and subagent dispatch as a library. Build a custom orchestrator. Wire it to your existing services. The mental model is identical to interactive Claude Code, but you control the host.</p><p>Worth picking up when &#8220;claude -p&#8221; with a long pipe stops being expressive enough. Below that, the CLI is fine.</p><h3><code>/loop</code>: in-session intervals</h3><pre><code><code>/loop 5m /check-deploy
</code></code></pre><p>Re-runs <code>/check-deploy</code> every 5 minutes inside the current session, until you stop it or hit the cap (50 concurrent loops, 3-day expiry). Useful for poll-style work: monitor a build, watch a metric, wait for a webhook to fire.</p><h3>Remote Tasks: cron in the cloud</h3><p>Define a GitHub repo, a prompt, and a cron schedule. Anthropic&#8217;s cloud spins up a Claude Code instance on the schedule, runs the prompt against the repo, and you don&#8217;t need your laptop open. Your &#8220;scheduled audit&#8221; or &#8220;weekly content batch&#8221; runs without you.</p><p>This is the part of Claude Code that most people haven&#8217;t internalized yet. You can hand off a recurring workflow entirely. The constraint shifts from &#8220;can I be at my desk?&#8221; to &#8220;can I describe the work clearly enough to leave it running?&#8221; Different problem.</p><p>When to reach for it: any task you&#8217;d otherwise do at the same time every day or week. Ad reports. Lead followups. Index health checks. Anything that&#8217;s deterministic in shape but tedious to remember.</p><div><hr></div><h2>13. Diagnosing bloat from session logs</h2><p>Every hygiene tactic here assumes you can tell when you&#8217;re violating it. Self-reporting is unreliable. You&#8217;ll swear you didn&#8217;t re-read that file and the logs will disagree.</p><p>Claude Code persists every session as JSONL, one event per line, at <code>~/.claude/projects/&lt;project-dir&gt;/&lt;session-uuid&gt;.jsonl</code>. The project-dir name is your cwd with non-alphanumeric characters replaced by hyphens. These files answer why did this session burn so many tokens.</p><h3>Useful diagnostic queries</h3><p><code>jq</code> gets you most of what you need. Record shapes evolve between versions, so adjust paths.</p><pre><code><code># Message type distribution
jq -r '.type' session.jsonl | sort | uniq -c

# Most-read files (duplicate-read detection)
jq -r 'select(.type=="tool_use")
       | select(.message.content[].name=="Read")
       | .message.content[].input.file_path' session.jsonl \
  | sort | uniq -c | sort -rn | head

# Biggest tool results by byte size
jq -c 'select(.type=="tool_result")' session.jsonl \
  | awk '{print length, NR}' | sort -rn | head
</code></code></pre><p>The second query is the most useful one in this article. Any file with a count of 5+ means re-read discipline is failing. The third points at the tool results that blew up the session, usually a screenshot, a giant Grep without <code>head_limit</code>, or a full-file Read.</p><h3>Patterns to look for</h3><ul><li><p>Same file Read 5+ times: re-read discipline failing.</p></li><li><p>Single tool results &gt;50KB: screenshot or full-file-read culprits.</p></li><li></li></ul><blockquote><p>500 messages across topics with no <code>/clear</code>: topic-shift discipline failing.</p></blockquote><ul><li><p>Zero Agent calls in a 5MB session: missed delegation.</p></li><li><p>Back-to-back Edit calls on the same file with small diffs: thrashing from unclear instructions.</p></li></ul><p>Post-mortem, not live monitoring. Once a week, pick your worst session and run the three queries. Five minutes. The patterns repeat, and you&#8217;ll learn which discipline is weakest and target it. Token waste is measurable. Treat it like any other performance problem.</p><div><hr></div><h2>14. Putting it together: a daily workflow</h2><p>A tight checklist. Each item maps back to a section above.</p><h3>Session start (30 seconds)</h3><ul><li><p><code>/context</code> to verify clean slate.</p></li><li><p><code>git pull</code>.</p></li><li><p><code>claude mcp list</code> and disconnect anything unused.</p></li></ul><h3>During work</h3><ul><li><p>Discover first (Grep/Glob), then Read scoped.</p></li><li><p>Delegate anything bulky (searches, scans, multi-file) to subagents.</p></li><li><p>Background long ops (builds, deploys).</p></li><li><p>Watch status-line context %.</p></li></ul><h3>At checkpoints</h3><ul><li><p>Logical unit done &#8594; commit.</p></li><li><p>Wrong path two turns ago &#8594; <code>/rewind</code>.</p></li><li><p>Topic shift &#8594; handoff + <code>/clear</code> (or <code>/compact</code> with instructions for related continuations).</p></li><li><p>Stuck &#8594; dump state to file, <code>/clear</code>, come back fresh.</p></li></ul><h3>Session end</h3><ul><li><p>Persist anything cross-session-worthy to memory or CLAUDE.md.</p></li><li><p>Handoff open work.</p></li></ul><h3>Weekly</h3><ul><li><p>Pick your worst session log and run the diagnostic queries from section 13.</p></li><li><p>Audit MCP servers; disconnect anything unused.</p></li><li><p>Promote any thrice-repeated workflow into a slash command or skill.</p></li></ul><p>This is a reference, not an exhaustive guide. The detail for each bullet lives in the relevant section.</p><div><hr></div><h2>Closing</h2><p>Claude Code&#8217;s ceiling isn&#8217;t model intelligence. It&#8217;s how much relevant context you can hold at low cost while doing the next step. Re-reading is waste. Full-file dumps are waste. Bash for file ops is waste. Stale MCP servers are waste. Bloated CLAUDE.md files are waste.</p><p>Keep the context lean. Delegate bulk work to subagents. Commit often. <code>/clear</code> without fear because <code>/resume</code> and <code>/rewind</code> are always there. Enforce the rules that matter via <code>settings.json</code> instead of hoping prose holds. Turn the recurring stuff into skills, slash commands, and remote tasks so you stop doing it by hand.</p><p>Do these things for a week and your token usage drops by half for the same work. A month in and you won&#8217;t go back.</p><p>If you try one of these and it meaningfully changes how a session feels, I&#8217;d like to hear which one. Especially the tactic you didn&#8217;t expect to matter.</p><p><em>Navneet Singh is Founder and CEO of Webority Technologies, an engineering-first company shipping enterprise AI systems, healthcare IT platforms, and agentic engineering infrastructure. He runs millions of Claude tokens a month on production work for clients across ten countries.</em></p>]]></content:encoded></item><item><title><![CDATA[What the Claude Code leak actually shows about building AI products]]></title><description><![CDATA[AI in Enterprise: What Actually Works &#8212; Part 1]]></description><link>https://blog.navneetsingh.name/p/the-claude-code-leak</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/the-claude-code-leak</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Sun, 12 Apr 2026 05:35:20 GMT</pubDate><content:encoded><![CDATA[<p>AI in Enterprise: What Actually Works. Part 1</p><p>None of that is the interesting part.</p><p>512,000 lines of TypeScript from a production AI agent, involuntarily published to the world. The real question is what it tells you about how AI products actually get built at scale. If you read the source for what it is, not a scandal but a case study, several things that practitioners have suspected for months are now confirmed.</p><h2>How the source got out</h2><p>A developer going by @Fried_rice found a <code>.map</code> file bundled inside the Claude Code npm package. Source maps exist for debugging. They bridge minified production code and readable TypeScript. Someone forgot to strip them before shipping.</p><p>Within hours, the source was on GitHub. Within a day, it had 8,000-plus forks. Anthropic filed DMCA takedowns, which is the expected move. The less expected move: their automated DMCA process hit their own GitHub fork network in the blast radius, taking down thousands of legitimate repos that had nothing to do with the leak. Bystanders got caught in the sweep.</p><p>Boris Cherny, the engineer who created Claude Code, responded publicly. &#8220;It&#8217;s never an individual&#8217;s fault, it&#8217;s the system&#8217;s.&#8221; Contrast that with the SolarWinds breach, where the CEO testified before Congress that the cause was an intern who set a password to &#8220;solarwinds123.&#8221; Anthropic and SolarWinds are very different organizations. The response to a failure says more about an engineering team than the failure itself.</p><p>What&#8217;s interesting about the Cherny response isn&#8217;t the diplomacy. It&#8217;s the accuracy. A .map file in an npm package is a process gap, not a rogue actor. Someone at some point made a default configuration decision, no one caught it in review, and the package shipped. The only unusual thing is that the file happened to be 512,000 lines of commercially significant TypeScript.</p><h2>What the media covered (and why it distracted everyone)</h2><p>Three things dominated the coverage.</p><p><strong>Anti-distillation</strong>. The source contains logic labeled <code>ANTI_DISTILLATION_CC</code>. Fake tools injected to corrupt any training data scraped from Claude Code sessions. The goal is poisoning competitor model training. Technically clever, ethically contested, probably legally murky. Every major AI lab has some version of this or is thinking about it.</p><p><strong>Undercover mode</strong>. A setting that strips AI attribution from git commits, apparently for use by Anthropic employees contributing to open-source projects without revealing they&#8217;re using their own tool. The reaction was louder than the substance. A company using its own product while not advertising it is not exactly a revelation. The attribution question in AI-assisted code is genuinely complicated, but this particular implementation is more mundane than the coverage implied.</p><p><strong>The Tamagotchis</strong>. Yes, there are 18 species. Yes, there&#8217;s gacha rarity. Yes, the developers hex-encoded the word &#8220;duck&#8221; as a hex string to avoid an internal scanner that would flag it as a model codename. The duck thing is the most endearing thing in 512,000 lines. Some engineer spent real time making sure their virtual duck would survive code review.</p><p>These three things were the story for most of the coverage. They&#8217;re fine. They&#8217;re interesting. They&#8217;re not why practitioners spent days reading this source.</p><h2>KAIROS: what a production background agent actually looks like</h2><p>The most developed unreleased feature in the codebase is something called KAIROS. It has over 150 source references. Based on what&#8217;s visible in the source, it&#8217;s the real version of what every AI agent demo claims to be.</p><p>The architecture is specific. KAIROS fires periodic prompts when the terminal is unfocused or the user has been idle. Each tick has a hard 15-second blocking budget. The agent has exclusive access to tools that the standard Claude Code instance doesn&#8217;t get: <code>SendUserFileTool</code>, <code>PushNotificationTool</code>, <code>SubscribePRTool</code>. The design intent, readable in the surrounding prompt strings, is to surface things &#8220;the user hasn&#8217;t asked for and needs to see now.&#8221;</p><p>Most production AI agents today are pull-based. The user asks, the agent answers. KAIROS is push-based with a budget constraint. It monitors, decides what&#8217;s worth interrupting you for, and then pings you rather than waiting for you to ask.</p><p>This is what everyone in AI is trying to build. Background agents that actually behave like competent colleagues rather than overeager interns who respond only when poked. The gap between &#8220;AI that answers questions&#8221; and &#8220;AI that notices things&#8221; is where most enterprise AI projects fall flat.</p><p>Anthropic built it. They haven&#8217;t shipped it yet. The 15-second blocking budget suggests they&#8217;re still working out the cost-latency tradeoff for background execution, each tick is a full model inference. But the architecture is there, the tooling is specific, and the intent is clear.</p><p>If you&#8217;re building enterprise AI agents right now, KAIROS is worth understanding as a design target. Not to copy it. The specific implementation is Anthropic&#8217;s and the IP questions are obvious. But internalize the architectural decision: push-based with a hard budget, selective interruption, dedicated tool access for the background context.</p><h2>AutoDream: the memory problem is harder than anyone says out loud</h2><p>Memory consolidation across AI sessions is the problem that most enterprise AI deployments haven&#8217;t solved, and most of the AI product demos pretend doesn&#8217;t exist.</p><p>The source shows what Anthropic&#8217;s internal attempt looks like. The system is called AutoDream, and it&#8217;s triple-gated before it fires: the session must be idle, there must be a gap of at least 24 hours since the last session, and the user must have accumulated at least five sessions. Only then does it run.</p><p>When it does run, the process is a full reflective pass across four phases: Orient, Gather, Consolidate, Prune. It removes near-duplicates. It resolves contradictions between memories. It flags memories that have &#8220;drifted.&#8221; Things that were true at the time they were stored but are no longer consistent with recent behavior.</p><p>The Hacker News thread on the leak had a comment that sat at the top for most of the discussion: &#8220;Memory consolidation between sessions is the actual unsolved problem.&#8221; Every enterprise AI deployment I&#8217;ve worked on or seen runs into the same wall eventually: what happens to context across sessions? Most products either give up (stateless, every session starts cold) or fake it (dump a summary into the system prompt that degrades quickly in quality).</p><p>AutoDream is a genuine attempt at structured consolidation. The orientation/gather/consolidate/prune cycle maps to something you&#8217;d recognize from systems design. Not unlike how a database handles transaction log compaction. The fact that it&#8217;s triple-gated is notable: Anthropic clearly ran this more aggressively in earlier versions and got bad results. The 24-hour gap and five-session threshold suggest the consolidation model works better with more data and more time, not less.</p><p>There&#8217;s one other detail from the source worth calling out. CLAUDE.md, the context file that defines project-level instructions, is reinserted into the context every turn, not just at session start. This was suspected by people who had observed certain prompt cache patterns, but it&#8217;s confirmed in the source. The implication for enterprise deployments is practical: any project-level instruction set needs to be written with turn-by-turn reinsertion in mind, not just session initialization.</p><h2>Multi-agent orchestration is a prompt, not a framework</h2><p>The section of the codebase that generated the most reaction in engineering communities is <code>coordinatorMode.ts</code>.</p><p>The multi-agent orchestration logic, the part that decides how to break down a complex task, spin up parallel workers, manage dependencies between subtasks, and route results back, is written as a natural language prompt. Not code. A prompt.</p><p>Hacker News put it plainly: &#8220;So much for LangChain and LangGraph. If Anthropic themselves aren&#8217;t using it...&#8221;</p><p>The technical architecture underneath is coherent. Parallel workers share a prompt cache, which means the cost doesn&#8217;t multiply linearly with the number of agents. Risk is classified at the task level (LOW, MEDIUM, HIGH) and HIGH-risk actions require a human gate before execution. These are sound engineering decisions.</p><p>But the orchestration logic itself, the stuff that would be code in any conventional architecture, is a prompt.</p><p>Most of the orchestration abstraction layers being built right now (multi-agent frameworks, task graph libraries, agent communication protocols) are solving problems that may not need to be solved at this stage. The evidence from the Anthropic source is that if your model is capable enough, the coordination problem reduces to a prompt engineering problem. You describe the task decomposition strategy in natural language, and the model executes it.</p><p>Orchestration frameworks aren&#8217;t useless. They&#8217;re just premature at this stage. The coordination abstractions make sense when you need deterministic execution guarantees, audit trails, or cross-model coordination where you can&#8217;t rely on a single capable model to reason about the task structure. For everything else, which is most of what people are building right now, the natural language coordinator is probably good enough and significantly easier to change.</p><h2>Unreleased features as a product roadmap</h2><p>Four features in the source aren&#8217;t shipped yet. Read together, they outline where agentic AI tooling is going.</p><p><strong>ULTRAPLAN</strong> offloads planning for complex tasks to a 30-minute remote Opus session. There&#8217;s keyword detection logic that routes certain task types to ULTRAPLAN rather than inline planning. The architecture includes a &#8220;teleport sentinel,&#8221; a mechanism to retrieve the results of the remote planning session back into the local context when it completes. The implication is that some tasks are better planned with a longer-horizon, higher-capability pass before execution begins. Most current agents do planning and execution in a single context window. Separating them, with different capability and time budgets for each, is a different design philosophy.</p><p><strong>Voice mode</strong> is further along than the existence of unreleased features usually suggests. Full push-to-talk, using Deepgram Nova 3 for transcription, routing through <code>api.anthropic.com</code> rather than <code>claude.ai</code>. The routing detail matters: Cloudflare&#8217;s TLS fingerprinting apparently blocks non-browser clients from the <code>.ai</code> domain. The solution was to route voice through the API domain instead. This is the kind of operational detail that only shows up in production code. Not a design document, not a demo. Code that has run into a real network problem and implemented a workaround.</p><p><strong>Bridge Mode</strong> extends Claude Code sessions to browser and mobile. The architectural pattern makes sense: the local agent maintains state, the remote session connects to it. The challenge, readable in the surrounding code comments, is session handoff. Transferring enough context to the remote session to make it useful without being slow.</p><p><strong>TungstenTool</strong> is Anthropic-internal-only. Not shipped to users. It gives Claude direct keystroke and screen-capture control over the terminal via tmux. The implication is that there&#8217;s an internal version of Claude Code that is considerably more capable at direct system control than what ships externally.</p><p><strong>MagicDocs</strong> is the most practically interesting for enterprise contexts. Files starting with <code># MAGIC DOC:</code> are tracked automatically. After each turn, a Sonnet sub-agent reviews what changed in the session and updates those files to reflect the current state of the project. Auto-updating documentation, maintained by a background agent, without explicit user action. The hard problem with documentation isn&#8217;t generating it. It&#8217;s keeping it current. MagicDocs is a specific attempt to solve that with a background sub-agent rather than developer discipline.</p><h2>The security findings most people didn&#8217;t read closely</h2><p>The coverage spent more words on the Tamagotchis than on two security findings that actually matter.</p><p><strong>The 50-subcommand cap</strong>. The Bash tool limits analysis to 50 subcommands. Above that count, it falls back to &#8220;ask,&#8221; the safe default, declining to execute. This sounds like a security feature. It partially is. But the cap was added to fix a UI freeze bug, not to prevent malicious commands. Security was incidental. A crafted command with more than 50 subcommands may bypass deny rules that were intended to block specific patterns. Not a theoretical vulnerability. A real gap in the deny rule system with a traceable cause.</p><p><strong>Token cache drain</strong>. There&#8217;s a session serialization bug. When a session is saved, attachment types are stripped. When the session resumes, tool announcements are rebuilt from scratch. This shifts the cache prefix positions, breaking cache alignment. The result: cache hit ratio degrades from roughly 67% at the start of a long session to around 26% by the end. In practical terms, this makes long sessions significantly more expensive than they should be.</p><p>The community patched this using the leaked source before Anthropic had issued any official fix. Boris Cherny confirmed the bug. Neither finding is catastrophic. Both are the kind of thing that happens in a fast-moving production codebase when the team is building features faster than the QA surface can cover.</p><h2>The codebase quality debate</h2><p>Reddit&#8217;s r/programming thread was titled &#8220;Anthropic&#8217;s codebase is absolutely unhinged&#8221; and gathered 5,500-plus upvotes. The specific evidence: 460 <code>eslint-disable</code> comments, deprecated functions still in production, TODOs sitting in error handlers.</p><p>Then the engineers actually read it.</p><p>The community consensus that emerged over the next few days was more measured: &#8220;This is just a codebase.&#8221; The eslint-disable comments are high but not unusual for a product that moved from prototype to production at pace. The deprecated functions exist because the cost of removing them mid-feature build is higher than leaving them temporarily. The TODOs in error handlers are the honest acknowledgment that someone knew what needed fixing and left a marker rather than pretending it was done.</p><p>Production code at scale looks different from tutorial code. Anyone who looked at the source and was surprised by the debt has probably not shipped a 512,000-line product under competitive pressure.</p><h2>The Mythos proximity</h2><p>One thing worth noting that happened within days of the leak: Anthropic announced Mythos, an AI security agent. Not a public release. Just a preview. &#8220;Already found thousands of high-severity vulnerabilities in every major OS and web browser&#8221; through autonomous scanning. Available only to 40-plus critical infrastructure organizations through a $100M credits program.</p><p>Some on HN theorized both the Claude Code leak and the Mythos announcement were coordinated intentional disclosures. More likely explanation: Anthropic is shipping very fast and their release process hasn&#8217;t scaled proportionally. The .map file in the npm package and the narrow Mythos preview both suggest a company moving faster than its own process can contain. That&#8217;s not unique to Anthropic. It&#8217;s the signature of a company in a specific phase of growth where velocity is high and operational discipline around releases is still catching up.</p><h2>What converging architectural patterns mean for enterprise builders</h2><p>The source confirms something that practitioners have been arriving at independently: there is a converging architecture for production AI agents, and it looks like this.</p><p>Skeptical memory with structured consolidation, not naive accumulation. Background monitoring with budget constraints, not always-on reactive. Risk classification baked into the execution path, not bolted on later. Context reinsertion every turn, not just at session start. Natural language coordination for task decomposition, not custom orchestration code. Human gates for high-risk actions, not blind autonomous execution.</p><p>Multiple independent teams have arrived at this architecture by building things and watching them fail. The Claude Code source confirms that the team with the most direct access to the underlying model capability arrived at similar conclusions. That&#8217;s a signal worth taking seriously. These patterns aren&#8217;t framework-specific or model-specific. They&#8217;re structural solutions to structural problems in agentic AI systems.</p><p>Claude Code ranks 39th on TerminalBench, the agentic coding benchmark, despite being built by the same company that makes the underlying model. Thirty-ninth. The moat isn&#8217;t the model. It&#8217;s the harness. The orchestration, the memory, the context management, the risk classification, the prompt engineering around task decomposition. All of that is what makes an AI agent actually useful in production, and none of it comes free with API access.</p><p>This is the finding that enterprise builders should sit with. The architectural patterns in this source are transferable. Not the code. The code has obvious IP considerations. But the design decisions: how to handle memory drift, how to structure background monitoring, how to build risk gates that don&#8217;t create so much friction that users route around them, how to write a context file that survives turn-by-turn reinsertion without becoming noise.</p><p>These problems exist in every enterprise AI deployment. The source shows one production solution to each of them. That&#8217;s worth more than the Tamagotchi discourse.</p><p>The question the leak actually raises for practitioners isn&#8217;t about Anthropic&#8217;s security practices or their corporate culture. The question is this: given that we now have a detailed look at how a production agentic system gets built at scale (memory consolidation, background agents, risk classification, multi-agent coordination, context management), what does your current architecture look like against that bar?</p><p>Most enterprise AI deployments don&#8217;t have structured memory consolidation. Most don&#8217;t have risk classification at the execution level. Most don&#8217;t have background agents with budget constraints. Most are still reactive, stateless, and hoping the model compensates for the missing infrastructure.</p><p>The source confirms the bar. The bar is 512,000 lines. Some of it messy. Some of it clever. All of it earned through shipping.</p><p>The architectural patterns are there to study. The operational discipline to actually build that way is the part no source code can give you.</p><p><em>Navneet Singh is Founder and CEO at Webority Technologies, where the team builds enterprise AI systems, healthcare IT platforms, and agentic engineering infrastructure for clients across industries.</em></p>]]></content:encoded></item><item><title><![CDATA[Software is about to stop looking like software]]></title><description><![CDATA[The product interface is going through its biggest shift since desktop to web. Most builders are looking the wrong way.]]></description><link>https://blog.navneetsingh.name/p/software-is-about-to-stop-looking</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/software-is-about-to-stop-looking</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Sun, 05 Apr 2026 05:38:19 GMT</pubDate><content:encoded><![CDATA[<p><em>This is Part 2 of the Future of Software series. <a href="https://blog.navneetsingh.name/p/software-is-a-proxy-ai-makes-it-obsolete">Read Part 1: Software Is a Proxy. AI Makes It Obsolete.</a></em></p><p>&#8220;AI will replace all software UIs with a chat window.&#8221; Open a text box, type what you want, get an answer. No dashboards. No navigation. No buttons.</p><p>Sounds elegant. Also wrong.</p><p>The opposite take is equally wrong. That AI just means adding a chatbot sidebar to your existing Salesforce instance and calling it transformation. I&#8217;ve seen four enterprise clients do exactly this in the last 18 months. Users ignore the chatbot within two weeks. Every time.</p><p>The product interface isn&#8217;t dying. It&#8217;s going through the biggest shift since desktop to web. And most builders are getting it wrong because they think it&#8217;s a binary choice. Chat or dashboard. Pick one.</p><blockquote><p>The future is neither.</p></blockquote><div><hr></div><h2>Why pure chat fails</h2><p>Before I get into where things are going, it&#8217;s worth understanding why the &#8220;just a chat box&#8221; pitch falls apart the moment someone tries to use it.</p><p><strong>Humans think visually, not sequentially.</strong> A business owner asks &#8220;how is my company doing?&#8221; and they don&#8217;t want 500 words back. They want to see revenue trending up, one project turning red, cash reserves stable. A well designed visual communicates in 2 seconds what takes 2 minutes to read. We built a project management tool for a healthcare client last year. First version had a conversational interface. Client&#8217;s project managers hated it. They needed to see the sprint board AND team capacity AND client deadline all at once. Not one at a time through a chat window.</p><p><strong>Chat has no persistent state.</strong> Ask &#8220;show me overdue tasks.&#8221; Get a list. Close the chat. Where&#8217;s the list? Gone. Ask again tomorrow, get a new list. Humans need spatial anchoring. The feeling that information lives somewhere stable, not summoned from thin air each time you ask.</p><p><strong>Chat can&#8217;t handle parallel attention.</strong> A project manager needs four data streams in peripheral vision while focusing on one. Chat forces everything into a single sequential thread. That&#8217;s a downgrade, not an upgrade.</p><p>So pure chat is out. But traditional dashboards are also increasingly inadequate. They show everything to everyone, all the time, regardless of what actually matters right now. They make humans come to the information instead of bringing information to the human.</p><p>What&#8217;s left?</p><div><hr></div><h2>Four stages of product interface evolution</h2><p>This transition isn&#8217;t a single leap. It&#8217;s a progression through four stages. Each one changes the fundamental relationship between the user and the product. I&#8217;ve been building B2B software for 18 years and we&#8217;re watching this play out in real time across our client base.</p><h3>Stage 1: Static dashboards (where most products are today)</h3><p>You navigate to information. The product has a fixed structure. Tabs, sidebars, pages, settings. The same dashboard shows the same layout to everyone, every time.</p><p>This is how Salesforce, Jira, HubSpot, Tally, and virtually every B2B tool works today. The UI is the product. Learning the UI is learning the product. The skill is in navigation.</p><p>We operate at this stage with most of our enterprise clients still. About 80% of the custom software we build in any given quarter is Stage 1. It works. It&#8217;s just not where things are heading.</p><h3>Stage 2: Conversational hybrid (where the progressive products are heading)</h3><p>You ask for information, the system responds with both text and visual context. The dashboard still exists but it&#8217;s increasingly secondary.</p><p>&#8220;What should I focus on today?&#8221; returns a prioritised list with context about why each item matters. Not because you navigated to a &#8220;priorities&#8221; page, but because the system synthesised across your tasks, calendar, team status, and deadlines to generate an answer.</p><p>We started building Stage 2 interfaces about eight months ago. A healthcare client wanted their clinical coordinators to be able to ask &#8220;which patients need follow up today&#8221; instead of navigating through four different screens to compile the list manually. The coordinator&#8217;s daily workflow went from <strong>45 minutes of screen navigation to a 3 minute conversation</strong>. Same data, same decisions, completely different interaction model.</p><p>Most users in Stage 2 products spend 80% of their time in conversation mode and 20% in dashboard mode. The inverse of today.Stage 3: Ambient intelligence (where things get interesting)</p><p>The system doesn&#8217;t wait for you to ask. It proactively delivers the 2 or 3 things that need your attention, through whatever channel you&#8217;re already on. WhatsApp, Slack, email, push notification.</p><p>8 AM, your phone buzzes: &#8220;Two items need attention. One team member is blocked. Reply 1 or 2 to choose an approach and unblock them. One deadline is at risk. Approve a scope adjustment or extend the timeline. Everything else is on track.&#8221;</p><p>You reply &#8220;2&#8221; and &#8220;approve.&#8221; Twelve seconds. Your entire morning interaction with what used to be a complex software product.</p><blockquote><p>The design principle inverts: if the system hasn&#8217;t contacted you, everything is fine. Silence is the signal that things are working. This is how a great executive assistant operates. They don&#8217;t hand you a 50 page report every morning. They tell you the three things that need your judgment. Everything else is handled.</p></blockquote><p>We&#8217;re prototyping this for a logistics client right now. Their operations manager currently spends 90 minutes every morning reviewing dashboards across three different systems. The goal is to bring that down to under 5 minutes of notification responses. We&#8217;re about halfway there.</p><h3>Stage 4: Generated interfaces</h3><p>No pre-built screens exist at all. When you want to see something, you describe what you want and the system generates a visualisation on the fly. Perfectly tailored to your question, your role, and your context.</p><p>&#8220;Show me how the team is doing&#8221; generates a completely different view for a CEO than for a team lead. The CEO sees cross-team velocity trends and budget utilisation. The team lead sees individual contributor output and blocker resolution times. Same question, different generated interface, because the system understands who&#8217;s asking and what they actually need.</p><p>&#8220;Compare this quarter with last quarter&#8221; doesn&#8217;t load a pre-built comparison page. It generates a side by side analysis highlighting specifically what changed, what caused the change, and what actions might address it. The visualisation is ephemeral. It exists for this moment, for this question, and then dissolves.</p><p>There is no &#8220;analytics page&#8221; with 15 pre-configured charts that someone built once and nobody updates. Every view is generated on demand, contextual to the user, and disposable after use.</p><p>We haven&#8217;t built a full Stage 4 system for a client yet. But we&#8217;ve built pieces. A government reporting module where the interface generates different compliance views depending on which regulatory body is requesting the data. Same underlying dataset, completely different presentation. That&#8217;s a taste of where this goes when it matures.</p><div><hr></div><h2>Five properties of the future interface</h2><p>Regardless of stage, the direction is clear. Future interfaces share five properties that are fundamentally different from today&#8217;s software.</p><h3>1. Exception based, not comprehensive</h3><p>Today&#8217;s products show you everything. All tasks, all deals, all transactions. The user&#8217;s job is to scan through comprehensive views and find what matters. That&#8217;s an enormous cognitive tax.</p><p>Future products show you only what needs attention. Three items are red. Everything else is fine. The 200 transactions that reconciled correctly are invisible. The 3 that didn&#8217;t are surfaced.</p><blockquote><p>The metric for a well designed future product is not &#8220;time spent in app.&#8221; It&#8217;s &#8220;decisions made per minute of attention.&#8221; If a user can process their entire daily workload in 90 seconds of interaction, that&#8217;s a triumph. Not a retention problem.</p></blockquote><p>I keep having this argument with product managers who are worried about engagement metrics dropping. If your users accomplished everything they needed and left in 45 seconds, you won. If they spent 20 minutes browsing dashboards and left without taking an action, you lost. The engagement model of the future is the opposite of consumer social media.</p><h3>2. Multi-modal, not screen bound</h3><p>Today&#8217;s products live on a screen. You open the app, use it, close it.</p><p>Future products exist across multiple channels simultaneously. Morning summary arrives as a WhatsApp message. Time sensitive approval pops up as a push notification. Deep analysis request generates a visual in the web app. Quick status check answered by voice assistant.</p><p>The product meets you where you are, in the format appropriate for the interaction&#8217;s complexity. Channel selection isn&#8217;t a user preference to configure. It&#8217;s a decision the system makes based on urgency, complexity, and context.</p><p>We&#8217;re seeing this with our own internal tools. Our marketing system runs across 10 tracks with automated alerting. When ad spend drifts more than 15% overnight, the alert goes to Slack. When a review drops below 3 stars, the notification goes to the responsible person&#8217;s phone. When someone wants to dig into campaign performance, they open the dashboard. Different channels for different urgency levels. Nobody configured that. The system decides.</p><h3>3. Conversation first, visualisation second</h3><p>The primary interaction model is natural language. But the response isn&#8217;t always text. That&#8217;s the nuance the &#8220;just a chat box&#8221; crowd misses.</p><p>When you ask &#8220;how are we doing on revenue?&#8221; the best answer is a chart. When you ask &#8220;who&#8217;s falling behind?&#8221; the best answer is a ranked list. When you ask &#8220;what happened last Tuesday?&#8221; the best answer might be a timeline.</p><p>The AI should know when to respond with words, when to respond with a visualisation, and when to respond with an action. The interface is generated in response to the question, not pre-built awaiting it. Pre-built dashboards assume the designer knows what the user will want to see. Generated visualisations assume the system can figure it out in real time. The latter is almost always more useful, because what matters changes every day.4. Progressively deep. Glanceable to explorable</p><p>The initial response should be absurdly simple. A traffic light. A single number. A one sentence summary. &#8220;Everything&#8217;s on track&#8221; or &#8220;Two things need your attention.&#8221;</p><p>But depth should be instantly available. Tap on &#8220;two things need attention&#8221; and you get the specifics. Tap on a specific issue and you get the full context. Conversation history, timeline, root cause analysis, recommended actions. Tap further and you get the raw data.</p><p>The design principle: <strong>the top layer should be understandable in 3 seconds</strong>. Every deeper layer is opt in. Most days, most users never go past the first layer. That&#8217;s success, not failure.</p><p>Think of it like a newspaper versus a research library. Today&#8217;s software is a research library. Everything is there, find what you need. Tomorrow&#8217;s software is a newspaper with a library behind it. The headlines tell you what matters, and you can always dig deeper.</p><h3>5. Action oriented, not information oriented</h3><p>This might be the most underappreciated shift. Today&#8217;s products end at &#8220;here&#8217;s the information.&#8221; The user then has to decide what to do and go somewhere else to do it. See a problem in the dashboard. Think about the solution. Switch to email to communicate it. Switch to the task tool to update it. Switch back to verify.</p><p>Future products end at &#8220;here&#8217;s the recommended action. Approve?&#8221;</p><p>&#8220;A team member is blocked on a decision. Here are both options with trade offs. Reply 1 or 2 to unblock them.&#8221; That&#8217;s not information delivery. That&#8217;s a decision point with pre-packaged execution. The user makes a judgment call, the system handles everything else. Communicating the decision, updating records, adjusting timelines, notifying stakeholders.</p><p>Every interaction should conclude with the work being done, not with the user having more information to act on manually.</p><div><hr></div><h2>What this means if you&#8217;re building</h2><p>If you&#8217;re building a B2B product right now, or redesigning one, a few things follow from this.</p><p><strong>Your home screen should not be a dashboard</strong>. It should be &#8220;What needs your attention right now.&#8221; Two or three cards, maximum. Everything on track is invisible.</p><p>Your primary interaction model should be conversational. A text input at the centre, not a navigation menu. &#8220;What&#8217;s behind schedule?&#8221; gets an intelligent answer. &#8220;Reassign the homepage task to Sarah&#8221; is executed, not routed to a form.</p><blockquote><p>Your notification layer is your most important surface. More users will interact through notifications than through your app. The notification isn&#8217;t a pointer to the app. The notification is the app for 90% of interactions.</p></blockquote><p><strong>Build zero permanent analytics pages</strong>. Every chart should be generated on demand in response to a question. Kill the &#8220;Analytics&#8221; tab with its 15 pre-built charts that 3% of users visit monthly.</p><p>Every piece of information should end with a suggested action. Don&#8217;t show &#8220;3 invoices are overdue.&#8221; Show &#8220;3 invoices are overdue. Payment reminders drafted. Send all three?&#8221;</p><blockquote><p>Measure <strong>decisions per minute, not time in app</strong>. Less time in your product means more value from your product.</p></blockquote><div><hr></div><h2>The uncomfortable bit</h2><p>Most B2B products being built today, including products that call themselves &#8220;AI-powered,&#8221; are designed around Stage 1 assumptions. They have dashboards. They have navigation menus. They have settings pages and configuration wizards. They&#8217;ve added an AI chat sidebar. That&#8217;s decoration.</p><p>The products that win the next decade will be designed around Stage 3 and Stage 4 from the ground up. They&#8217;ll feel less like &#8220;software&#8221; and more like &#8220;a team member who happens to be omniscient and tireless.&#8221; The interface won&#8217;t be something you learn or navigate or spend time in.</p><p>It will be something that works for you. Mostly in the background, occasionally surfacing for your judgment, always concluding with the work actually getting done.</p><p>The dashboard is dead. Not because screens are dead or because visual information is dead. But because the idea that a human should spend time navigating pre-built screens to find information and then separately act on it. That idea is dead.</p><p>What replaces it is better. Faster. Quieter. And, paradoxically, more visual than ever. Because when the system generates exactly the right visualisation for exactly the right question at exactly the right moment, the visual impact is far greater than a permanent dashboard full of charts nobody looks at.</p><p>The future of product UI isn&#8217;t no interface. It&#8217;s the right interface, at the right time, for the right person, generated in the moment it&#8217;s needed, and gone the moment it&#8217;s done.</p><blockquote><p>We&#8217;re building some of this right now. The early results are encouraging. And honestly a little unsettling. When the first thing your client says after using the new system is &#8220;I don&#8217;t feel like I&#8217;m using software anymore,&#8221; you know something fundamental shifted.</p></blockquote><div><hr></div><p><em><a href="https://www.linkedin.com/in/navneetsinghlall/">Navneet Singh</a> is the Founder &amp; CEO of Webority Technologies. He writes about engineering-first approaches to building technology companies.</em></p>]]></content:encoded></item><item><title><![CDATA[Software Is a Proxy. AI Makes It Obsolete.]]></title><description><![CDATA[Why dashboards, workflows, and "products" as we know them won't survive the next decade.]]></description><link>https://blog.navneetsingh.name/p/software-is-a-proxy-ai-makes-it-obsolete</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/software-is-a-proxy-ai-makes-it-obsolete</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Sun, 29 Mar 2026 14:06:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VrRv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VrRv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VrRv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!VrRv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!VrRv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!VrRv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VrRv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85204,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.navneetsingh.name/i/192507356?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VrRv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!VrRv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!VrRv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!VrRv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb807e613-9cef-47fa-a260-cb7cbc3c8a58_1200x675.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Every piece of B2B software ever built exists for one reason: humans can&#8217;t hold enough information in their heads.</p><p>A project manager can&#8217;t track 500 tasks, their dependencies, their statuses, and their blockers simultaneously. So we built Jira. A salesperson can&#8217;t remember every interaction with every prospect. So we built CRM systems. Accountants, HR teams, marketers, all the same story. We kept building structured tools to compensate for the limits of human memory and attention.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.navneetsingh.name/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The First Principles! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Every SaaS product is fundamentally a structured information proxy for humans. The UI, the database schema, the workflow engine, all of it exists because humans need structure to process information.</p><p>Now ask the uncomfortable question: what happens when AI doesn&#8217;t have those limitations?</p><p>An AI can hold the entire context of 500 tasks, their dependencies, every conversation that created them, every commit that relates to them, and every team member&#8217;s workload. Simultaneously. In memory. Without a database UI. It doesn&#8217;t need a kanban board to &#8220;see&#8221; the work. It doesn&#8217;t need a pipeline view to &#8220;understand&#8221; the sales funnel. It doesn&#8217;t need a trial balance to &#8220;know&#8221; the financial position.</p><blockquote><p><strong>The proxy becomes unnecessary</strong>. And that means the product as a category starts to dissolve.</p></blockquote><div><hr></div><h2>Three eras of software</h2><p><strong>Era 1 (1980&#8211;2010): Software as a tool.</strong></p><p>You operate it. Excel. Photoshop. Tally. AutoCAD. The human does the work, the software is the instrument. A master of Excel is more productive than a novice. You pay for what the software can do.</p><p><strong>Era 2 (2010&#8211;2025): Software as a system.</strong></p><p>You configure it. Salesforce. Jira. HubSpot. Workday. The human designs workflows, sets up automations, defines rules. The software executes them at scale. The skill shifts from operating to configuring. An entire consulting industry emerges around &#8220;Salesforce implementation&#8221; and &#8220;Jira administration.&#8221;</p><p>You pay for processes the software runs.</p><p><strong>Era 3 (2025&#8211;???): Software as an agent.</strong></p><p>You direct it. State the outcome. The AI figures out the process, executes the work, reports back. No configuration. No workflow design. No administration.</p><blockquote><p><strong>You pay for work done</strong>.</p></blockquote><p>We&#8217;re at the very beginning of Era 3. Most of the industry hasn&#8217;t figured out what that means yet.</p><p>I run a technology company. I&#8217;ve spent the last year watching our own clients ask for AI-native rebuilds of tools they&#8217;ve used for a decade. Not &#8220;add a chatbot.&#8221; Rebuild it. That&#8217;s the signal.</p><div><hr></div><h2>The Proxy Stack</h2><p>I think about this as layers. Every piece of software sits somewhere on what I call the Proxy Stack: how much stands between a human&#8217;s intent and the outcome they want.</p><ul><li><p><strong>Layer 4 &#8212; Thick Proxy.</strong> You do the work, software is the instrument. Excel, Tally, Photoshop. (Era 1)</p></li><li><p><strong>Layer 3 &#8212; Structured Proxy.</strong> You configure workflows, software executes. Salesforce, Jira, HubSpot. (Era 2)</p></li><li><p><strong>Layer 2 &#8212; Assisted Proxy.</strong> You operate the system, AI helps at the edges. Chatbot in the sidebar, auto-generated summaries. (<strong>Era 2.5</strong>)</p></li><li><p><strong>Layer 1 &#8212; Thin Proxy.</strong> You approve and direct, AI does most of the work. (Early Era 3)</p></li><li><p><strong>Layer 0 &#8212; Zero Proxy.</strong> You state the outcome, AI handles everything. (Full Era 3)</p></li></ul><p>Most of the SaaS industry right now is fighting over the move from Layer 3 to Layer 2. They&#8217;re calling it transformation. It&#8217;s <strong>a one-layer improvement while the market is heading to zero</strong>.</p><blockquote><p>The interesting question for any software product becomes simple: what layer are you on, and how fast are you moving down?</p></blockquote><div><hr></div><h2>The Era 2.5 trap</h2><p>Right now, every SaaS company is bolting AI onto their existing product. A chatbot in the sidebar. An &#8220;AI insights&#8221; panel. Auto-generated summaries. Content suggestions.</p><blockquote><p>They&#8217;re calling this &#8220;AI-powered.&#8221; It&#8217;s not. It&#8217;s <strong>Era 2 software with Era 3 marketing</strong>. Layer 3 products wearing a Layer 2 costume.</p></blockquote><p>The fundamental architecture hasn&#8217;t changed. The database schema is the same. The UI is the same. The workflow engine is the same. The user still needs to create records, update statuses, configure automations, and navigate dashboards. The AI is a feature, not the foundation.</p><p>I call this <strong>Era 2.5</strong>. And it&#8217;s a trap, because it gives incumbents the illusion of transformation while leaving them structurally vulnerable to genuine Layer 1 and <strong>Layer 0</strong> products.</p><p>The pattern is familiar. When the web emerged, most software companies built a &#8220;web portal&#8221; on top of their existing client-server architecture. It looked modern. It wasn&#8217;t. Salesforce, a true web-native architecture, ate their lunch. When mobile emerged, most companies built &#8220;responsive&#8221; versions of their desktop UIs. Instagram, Uber, WhatsApp didn&#8217;t do that. They were mobile-native from the ground up and created entirely new categories.</p><p>The same structural displacement is beginning now. It&#8217;s already starting. Klarna replaced 700 customer service agents with AI and reported the same satisfaction scores. Harvey is handling legal research that junior associates used to do. Cursor and similar tools are writing production code that ships without human review. These aren&#8217;t experiments. They&#8217;re early Layer 1 products eating into Layer 3 territory.</p><div><hr></div><h2>What Layer 0 products actually look like</h2><h3>The UI collapses</h3><p>A <strong>Layer 0</strong> product might not have a traditional UI at all. Not &#8220;minimal UI,&#8221; potentially no persistent visual interface. The interaction model is conversational plus notifications plus generated artifacts.</p><p>You don&#8217;t &#8220;open the project management tool.&#8221; You ask &#8220;what should I focus on today?&#8221; and get an answer that pulls from projects, calendar, team capacity, and deadlines. The answer IS the product.</p><p>You don&#8217;t &#8220;check the CRM.&#8221; The CRM tells you, unprompted, that your biggest prospect hasn&#8217;t responded in 12 days and drafts a follow-up referencing their Q3 budget cycle.</p><p>The entire concept of &#8220;logging into software&#8221; becomes as archaic as &#8220;dialling up the internet.&#8221;</p><p>Now, &#8220;no UI&#8221; taken literally is an overcorrection. Humans are visual. Even at <strong>Layer 0</strong>, people will want to see their financial position, see their project timeline. The difference is that these visualisations are generated on demand, not pre-built dashboards you navigate to. You won&#8217;t click through &#8220;Reports &gt; Financial &gt; P&amp;L &gt; FY 2026.&#8221; You&#8217;ll say &#8220;show me how we&#8217;re doing financially&#8221; and get something tailored to your context. The UI isn&#8217;t dead. It&#8217;s generated, not designed. Ephemeral, not permanent.</p><h3>The database becomes invisible</h3><p>At Layer 3, users interact with structured data through forms and views. Create a contact. Update a deal stage. Change a task status. Every interaction is a human translating reality into a structured record.</p><p>At <strong>Layer 0</strong>, the AI maintains structured data as a side effect of understanding unstructured reality. A conversation happened on WhatsApp, the AI extracted a task, identified the owner, estimated the effort, slotted it into the sprint. A payment arrived in the bank account, the AI matched it to an invoice, updated receivables, adjusted the cash flow forecast.</p><p>The database still exists. But no human ever touches it directly. It&#8217;s the AI&#8217;s memory, not the user&#8217;s interface.</p><p>This single shift eliminates the number one complaint about every B2B tool in existence: <strong>the overhead of keeping it updated</strong>. Nobody hates managing projects. They hate maintaining the project management tool. Nobody hates tracking sales. They hate updating the CRM. The administrative tax of structured data entry is universal friction. <strong>Layer 0</strong> removes it entirely.</p><h3>Products merge into agents</h3><p>If the UI is conversational and the database is invisible, what actually separates a &#8220;PM tool&#8221; from a &#8220;CRM&#8221; from an &#8220;accounting system&#8221;?</p><p>At Layer 3, they&#8217;re different products because they have different UIs, different data models, different workflows. You switch between applications. You export from one and import into another. You build integrations to connect them.</p><p>At <strong>Layer 0</strong>, they&#8217;re different capabilities of the same agent. &#8220;Follow up with the client&#8221; is a CRM action. &#8220;Create the invoice for that deal&#8221; is an accounting action. &#8220;Assign the implementation to the engineering team&#8221; is a PM action. But to the user, it&#8217;s one continuous conversation with one system that understands the full context.</p><p>The concept of &#8220;software categories&#8221; dissolves. CRM, ERP, HRM, PM become capabilities, not products. And the company that assembles the most comprehensive set of capabilities into a single coherent agent wins the entire enterprise software market.</p><p>Though I&#8217;d push back on myself here: some domains will resist this merger for a long time. Finance, HR, legal, healthcare, anywhere errors carry regulatory or legal consequences, the trust curve is steep. An engineer might accept AI auto-creating tasks from Day 1. A CFO won&#8217;t trust AI to auto-file tax returns until it&#8217;s proven correct for 12 consecutive months. That&#8217;s not irrational resistance. It&#8217;s appropriate caution with real stakes.</p><div><hr></div><h2>The moat shifts from product to data</h2><p>At Layer 3, the moat is the product: features, integrations, ecosystem, brand. Salesforce&#8217;s moat is its AppExchange ecosystem and millions of trained admins. Jira&#8217;s moat is deep integration with the Atlassian suite and the inertia of enterprise workflows built around it.</p><p>At <strong>Layer 0</strong>, the product layer commoditises. AI can generate UIs dynamically. Workflows configure themselves. Integrations are just API calls that an agent handles. The traditional product moat erodes.</p><p>What replaces it is accumulated domain intelligence.</p><p>An AI that has processed 10,000 Indian SMB accounting datasets understands GST edge cases that a generic AI never will. An AI that has managed 5,000 engineering sprints predicts blockers with precision a new entrant can&#8217;t match. Features can be copied overnight. Domain intelligence compounds over years.</p><blockquote><p>The implication for builders: your first 1,000 customers aren&#8217;t revenue. They&#8217;re your dataset. The competitive distance between you and a new entrant is measured in accumulated learning, not feature parity.</p></blockquote><div><hr></div><h2>The interaction frequency inverts</h2><p>This one challenges every SaaS metric we&#8217;ve been taught to worship.</p><p>Layer 3 products optimise for engagement. Daily active users. Time-in-app. Sessions per day. Product teams celebrate when users spend more time in their tool. Growth teams optimise for habit formation. The entire product strategy assumes that a &#8220;sticky&#8221; product is a good product.</p><p><strong>Layer 0</strong> inverts this completely.</p><p>The best AI agent is the one you interact with the least, because it&#8217;s handling everything autonomously. A project management system that requires zero daily interaction beats one that requires 30 minutes. An accounting system that needs one approval per day beats one demanding 2 hours of data entry.</p><p>Success is measured by the absence of human involvement, not its presence.</p><p>This breaks every SaaS business metric. DAU becomes meaningless. Time-in-app becomes a failure indicator. The companies that figure out new metrics (tasks autonomously completed, decisions made without human intervention, exceptions per 1,000 transactions) will build the products that actually matter.</p><blockquote><p>The north star for <strong>Layer 0</strong>: how much valuable work happened without anyone touching the product today?</p></blockquote><blockquote><p>And if engagement metrics break, pricing does too. Per-seat makes no sense when AI does the work of five people. The model shifts to outcomes: per transaction processed, per ticket resolved, per project managed. <strong>You pay for work done</strong>, not tools provided.</p></blockquote><div><hr></div><h2>What this means if you&#8217;re building</h2><p>If you&#8217;re building B2B software today, the strategic question isn&#8217;t &#8220;what features should we add?&#8221; It&#8217;s where are you on the Proxy Stack, and how fast are you moving down?</p><p>Sitting at Layer 3? Your window is closing. Not today, not this year, but within 3-5 years, Layer 1 alternatives will begin displacing products that require manual data entry, workflow configuration, and dashboard navigation.</p><p>Moving from Layer 3 to Layer 2? You&#8217;re buying time, not building a moat. The AI chatbot in your sidebar doesn&#8217;t change the fundamental architecture. Use the time well. Start rebuilding the foundation, not the facade.</p><p>Building for <strong>Layer 0</strong> from scratch? You have the structural advantage but face the distribution disadvantage. Incumbents have millions of users, thousands of integrations, and decades of trust. Your product needs to be dramatically better on the one dimension that matters most: <strong>elimination of human effort</strong>.</p><p>And if you&#8217;re not building software but running a business on it? Start asking your vendors a different question. Not &#8220;what features are on the roadmap&#8221; but &#8220;when does your product stop needing me to operate it?&#8221;</p><p>The transition will be slow and messy. Spreadsheets didn&#8217;t kill paper ledgers in a year. SaaS didn&#8217;t kill on-premise in a year. <strong>Layer 0</strong> won&#8217;t kill Layer 3 in a year either. Hybrid products will dominate the market for a while. Pure autonomous products will work for some use cases and fail for others.</p><p>But the direction is clear. The human-in-the-loop isn&#8217;t going away, it&#8217;s moving up. Instead of entering data and configuring workflows, humans do work that actually requires human judgment: setting strategy, making ethical calls, building relationships, evaluating ambiguity. The AI handles the structured, repeatable, process-driven layer. The human handles everything else.</p><blockquote><p>Every software category will be rebuilt around this principle. The only question is who rebuilds it first.</p></blockquote><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.navneetsingh.name/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The First Principles! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><p><em>Part 2 of this series is now live: <a href="https://blog.navneetsingh.name/p/software-is-about-to-stop-looking">Software is about to stop looking like software</a></em></p><p><em><a href="https://www.linkedin.com/in/navneetsinghlall/">Navneet Singh</a> is the Founder &amp; CEO of Webority Technologies. He writes about engineering-first approaches to building technology companies.</em></p>]]></content:encoded></item><item><title><![CDATA[CRED’s Identity Crisis: How a Premium Club Became a Platform Still Searching for Its Purpose]]></title><description><![CDATA[When CRED launched in 2018 under founder Kunal Shah, it carried the aura of a modern black card moment for Indian consumers.]]></description><link>https://blog.navneetsingh.name/p/creds-identity-crisis-how-a-premium</link><guid isPermaLink="false">https://blog.navneetsingh.name/p/creds-identity-crisis-how-a-premium</guid><dc:creator><![CDATA[Navneet Singh]]></dc:creator><pubDate>Sun, 14 Dec 2025 05:23:30 GMT</pubDate><content:encoded><![CDATA[<p>When CRED launched in 2018 under founder Kunal Shah, it carried the aura of a <strong>modern black card</strong> moment for Indian consumers.</p><p>When CRED launched, access was restricted to individuals with a <strong>credit score of 750+</strong>, reinforcing the idea that this was a genuine club for India&#8217;s most financially disciplined consumers.</p><p>The pitch felt simple and powerful:</p><blockquote><p>If you are financially disciplined, have a high credit score, and pay on time, you belong to an exclusive club. We&#8217;ll reward you for it.</p></blockquote><p>In spirit, it evoked the mythology of the iconic Amex Black Card: a quiet signal that you&#8217;ve &#8220;made it&#8221; financially and now get access to a different world of benefits.</p><p>CRED&#8217;s early positioning was clear:</p><ul><li><p>Aggregate India&#8217;s high&#8209;credit&#8209;score, financially responsible consumers.</p></li><li><p>Give them an elegant, reward&#8209;driven experience for paying credit card bills on time.</p></li><li><p>Build a community with trust, high spending capacity, and strong brand appeal.</p></li></ul><p>On paper, that is a powerful thesis. Capture a subset of consumers who are trusted by banks, have high scores, spend more, and likely have higher disposable income. then build premium financial services around them. The underlying bet: <strong>this audience should be monetizable at much higher margins than the typical mass&#8209;market user.</strong></p><p>In practice, CRED built something quite different.</p><h2>My Personal Experience with CRED: Why I Could Not Fully Trust It</h2><p>I signed up for CRED when it launched, partly out of curiosity and partly because I fell squarely into their target segment. I wanted to see what this &#8220;exclusive club&#8221; actually felt like from the inside.</p><p>At one point, CRED requested access to my Gmail account so it could scan card statements and provide personalized insights. I granted it briefly. just to evaluate the experience. but very quickly revoked access. The idea of giving a private company full visibility into all my emails didn&#8217;t sit well with me. It felt like too much trust, too early, without enough clarity on how my data would be used.</p><p>That moment stayed with me. It highlighted a deeper issue that ties directly into CRED&#8217;s business model:</p><blockquote><blockquote><p>If the value offered isn&#8217;t truly premium, users will hesitate to offer premium&#8209;level access.</p></blockquote></blockquote><blockquote><p>Trust is the currency of financial products. And for a platform attempting to position itself as a premium financial ally, trust must be earned with substance. not just sleek design or clever marketing.</p></blockquote><h2>Feature Timeline: How CRED Shifted Directions Over the Years (and What Each Shift Tells Us)</h2><p>To understand CRED&#8217;s <strong>identity crisis</strong>, it helps to look at its major product launches <strong>chronologically</strong>. The pattern reveals a platform trying multiple paths, each time nudging away from its original promise.</p><h3><strong>2018: The So&#8209;Called Exclusive Credit Card Bill Payment Club</strong></h3><p>CRED launches as an invite&#8209;only app for people with a <strong>750+ credit score</strong>, advertised as a premium club. although in reality, nothing inside felt genuinely exclusive.**.</p><ul><li><p>Simple value: Pay your credit card bill &#8594; earn CRED coins &#8594; redeem rewards.</p></li></ul><h3><strong>2019: Gamification Takes Over (The First Visible Drift)</strong></h3><p>CRED begins layering gamified mechanics. kill&#8209;the&#8209;bill, scratch cards, jackpots. These shifts moved the product away from being a disciplined financial club and closer to a dopamine&#8209;driven engagement app.<br>CRED starts introducing:</p><ul><li><p>&#8220;Kill the bill&#8221; games</p></li><li><p>Scratch cards</p></li><li><p>Jackpot&#8209;style campaigns</p></li></ul><h3><strong>2020: Launch of CRED Store</strong></h3><p>A marketplace redeemable through coins. but lacking anything truly exclusive. Instead of premium financial value, users saw repackaged discounts available elsewhere, weakening the club narrative.**<br>A curated marketplace of brands redeemable through coins. but almost nothing about it was truly premium. The supposed club offered no exclusive access, no elite experiences, and no member&#8209;only advantages.</p><h3><strong>2020: Introduction of CRED RentPay (Useful, But Not Premium)</strong></h3><p>A creative tool for rent payments via credit cards, but unrelated to premium benefits. It expanded utility, not exclusivity.**<br>Users could pay rent using a credit card by paying a fee.</p><h3><strong>2021: CRED Cash (Short&#8209;Term Credit That Premium Users Didn&#8217;t Need)</strong></h3><p>A lending product offering instant credit. But high&#8209;credibility users typically already access better rates from banks, making this feel misaligned with their needs.**<br>Instant credit lines offered through partner NBFCs.</p><h3><strong>2021: CRED Mint (Risky, Not Exclusive, and Not Tailored to High&#8209;Credibility Users)</strong></h3><p>Peer&#8209;to&#8209;peer lending opened a new avenue, yet introduced risk without delivering premium&#8209;grade wealth management. It felt experimental, not curated.**<br>Allowing users to lend money and earn interest.</p><h3><strong>2022: CRED Pay (Checkout Integration)</strong></h3><p>A merchant&#8209;checkout layer that positioned CRED as a payment facilitator. Useful for brands, but added no distinctive value for premium users.**<br>CRED partners with merchants to enable payment via CRED at checkout.</p><h3><strong>2022: Happay Acquisition (A Move Completely Outside the &#8220;Elite Club&#8221; Narrative)</strong></h3><p>A major entry into B2B expense management. A sharp turn away from the consumer&#8209;focused, premium&#8209;club identity.**<br>A major expansion into B2B financial operations.</p><h3><strong>2023&#8211;2024: Diversification Wave</strong></h3><p>Travel deals, dining offers, insurance, utilities. a scatter of features that broadened the platform but diluted the original promise even further.**<br>CRED begins offering:</p><ul><li><p>Travel deals</p></li><li><p>Dining experiences</p></li><li><p>Utility payments</p></li><li><p>Insurance&#8209;related products</p></li></ul><div><hr></div><h2>What CRED Actually Built: Features and Revenue Streams</h2><p>To understand the gap between promise and monetization, it helps to map what CRED has built and how it makes (or claims to make) money.</p><h3>Features and user experience</h3><p>Over the years, CRED has evolved from &#8220;pay your credit card bill and earn coins&#8221; to a broader fintech and commerce platform. The major pieces:</p><ul><li><p><strong>Credit&#8209;card bill payment hub</strong>: A single place to track multiple cards, get reminders, pay on time, and see basic analytics.</p></li><li><p><strong>Rewards and &#8220;CRED coins&#8221;</strong>: Every bill payment earns coins that can be redeemed for offers, discounts, and experiences.</p></li><li><p><strong>&#8220;Members&#8209;only&#8221; positioning</strong>: Eligibility based on credit score and branding around financial responsibility created a club&#8209;like feel.</p></li><li><p><strong>Additional verticals layered on top:</strong></p><ul><li><p>Rent payments via credit card (CRED RentPay) with convenience fees.</p></li><li><p>Short&#8209;term credit lines (CRED Cash / Stash) and peer&#8209;to&#8209;peer style products (CRED Mint).</p></li><li><p>A curated e&#8209;commerce &#8220;Store&#8221; and brand&#8209;offers marketplace.</p></li><li><p>Corporate and expense&#8209;management capabilities via acquisitions like Happay.</p></li></ul></li></ul><h3>Revenue and monetization channels</h3><p>Publicly, the monetization story looks something like this:</p><ul><li><p><strong>Brand/merchant listing fees and commissions</strong>: Brands pay to list offers, get visibility, and access this high&#8209;credit&#8209;score audience. CRED earns fees or commissions when users redeem.</p></li><li><p><strong>Transaction and processing fees</strong>: On flows like RentPay and certain payments, CRED charges convenience or service fees.</p></li><li><p><strong>Lending and interest income</strong>: From credit lines, lending products, and partnerships with banks/NBFCs.</p></li><li><p><strong>Data and user&#8209;insight monetization</strong>: In theory, enabling highly targeted access to a premium user base within regulatory bounds.</p></li></ul><h3>The financial picture in brief</h3><p>Even with growing revenue and a multi&#8209;billion&#8209;dollar valuation at its peak, CRED has consistently reported substantial operating losses. The topline is scaling; the bottom line still hasn&#8217;t convincingly followed.</p><p>So the natural question arises: <strong>If you&#8217;ve aggregated some of the country&#8217;s most creditworthy consumers, why is monetization still this hard?</strong></p><div><hr></div><h2>The Core Problem: Premium Audience, Non&#8209;Premium Value</h2><p>CRED&#8217;s thesis is straightforward: a user who is credit&#8209;worthy is more monetizable. Banks want them, brands want them, and advertisers love them.</p><blockquote><p>The catch is this: <strong>premium users expect premium value.</strong></p></blockquote><p>If what they receive, after clearing the &#8220;exclusive&#8221; bar, is an endless feed of discounts on consumer products, the experience quickly starts to feel less like a black card and more like a glorified coupon engine.</p><h3>1. The premium audience is valuable only if they feel they&#8217;re treated as premium</h3><p>The entire club narrative works only if <strong>the club feels different</strong>.</p><p>Instead of:</p><blockquote><p>&#8220;Because you&#8217;re financially solid, we&#8217;ll help you build more wealth, access better credit, and unlock superior financial opportunities.&#8221;</p></blockquote><p>the user journey often becomes:</p><blockquote><p>&#8220;Because you&#8217;re financially solid, here are some offers and cheap stuff you can buy if you redeem enough coins.&#8221;</p></blockquote><p>That&#8217;s a <strong>fundamental mismatch</strong>. You attract strong, disciplined financial profiles and then mostly nudge them to consume more, not necessarily to become <strong>richer, more secure, or more empowered</strong>.</p><h3>2. The margin economics of &#8220;cheap deals&#8221; is weak</h3><p>If your core loop is:</p><blockquote><p>pay bill &#8594; earn coins &#8594; redeem discount,</p></blockquote><p>then your economics are tied to the economics of discounts.</p><p>Deals are typically:</p><ul><li><p>Low&#8209;margin.</p></li><li><p>Often subsidized by brands as marketing spends.</p></li><li><p>Weakly linked to long&#8209;term loyalty or deep financial engagement.</p></li></ul><p>This can drive engagement and app opens, but it rarely produces <strong>high&#8209;margin, defensible revenue</strong>. You end up playing in the same arena as any rewards app or offer aggregator, just with better branding.</p><h3>3. The shift to real financial services is necessary: and difficult</h3><p>The only way to truly monetize a high&#8209;quality, high&#8209;trust user base is through <strong>financial products</strong>:</p><ul><li><p>Credit lines.</p></li><li><p>Investment products.</p></li><li><p>Insurance.</p></li><li><p>Wealth and advisory services.</p></li></ul><p>These products can deliver meaningful margin. But they also come with:</p><ul><li><p>Risk (credit risk, market risk).</p></li><li><p>Regulatory complexity.</p></li><li><p>The need for strong underwriting and data models.</p></li><li><p>Longer product cycles and slower, more disciplined growth.</p></li></ul><p>CRED has taken steps into this territory, but it&#8217;s still not clear that these initiatives have scaled to match the size and promise of the user base.</p><h3>4. Exclusivity vs scale: the strategic tension</h3><p><strong>Exclusivity is a differentiator</strong>. but it&#8217;s also a constraint.</p><p>If you insist on only the highest scores, your audience is relatively small. That&#8217;s fine <strong>if</strong> your monetization per user is strong. If it isn&#8217;t, exclusivity becomes a liability rather than a moat.</p><p>You&#8217;re then trapped between two unattractive choices:</p><ul><li><p>Loosen eligibility and dilute the premium narrative to chase volume.</p></li><li><p>Stay exclusive and accept thin monetization for a long time.</p></li></ul><p>Neither fully honors the original &#8220;elite club&#8221; story.</p><h3>5. The marketing and burn&#8209;rate trap</h3><p>Reward&#8209;driven businesses burn capital quickly:</p><ul><li><p>You subsidize user acquisition.</p></li><li><p>You subsidize rewards.</p></li><li><p>You spend on brand and advertising.</p></li></ul><p>If the monetization machine lags behind, you end up in a cycle of chasing ever more volume to justify ever more spend. without a clear path to sustainable profitability.</p><div><hr></div><h2>Where CRED Missed the Opportunity</h2><p>In my view, the real miss is simple:</p><blockquote><p>CRED figured out how to <strong>aggregate</strong> highly credible, disciplined financial users.<br>It did <strong>not</strong> figure out how to <strong>monetize</strong> them in a way that matches their profile.</p></blockquote><p>These are precisely the users who would respond to:</p><ul><li><p>Better investing options.</p></li><li><p>Sophisticated wealth&#8209;building tools.</p></li><li><p>Access to unique financial products.</p></li><li><p>Ways to optimize taxes, debt, and long&#8209;term planning.</p></li></ul><p>Instead, the experience has largely centered around:</p><ul><li><p>Games of chance.</p></li><li><p>Lucky draws.</p></li><li><p>Flashy campaigns.</p></li><li><p>A catalogue of offers that often look like the same promotions available elsewhere, repackaged inside a premium wrapper.</p></li></ul><p>It&#8217;s an <strong>emotional mismatch</strong>: for a user who sees themselves as financially solid and responsible, the platform often feels more like a gamified shopping feed than a serious financial ally.</p><div><hr></div><h2>What CRED Could Have Built Instead</h2><p>If I were building a business around high&#8209;credibility users, the design would tilt more towards <strong>wealth, leverage, and long&#8209;term value</strong>, and less towards <strong>discounts and dopamine</strong>.</p><h3>A. From &#8220;cheap deals&#8221; to &#8220;wealth&#8209;creation and financial empowerment&#8221;</h3><p>The narrative shift should be:</p><ul><li><p>From: <em>&#8220;You&#8217;ve paid your bills on time, here&#8217;s a deal.&#8221;</em></p></li><li><p>To: <em>&#8220;You&#8217;ve proven financial discipline, now we&#8217;ll help you compound it.&#8221;</em></p></li></ul><p>Concrete ways to do that:</p><ul><li><p>Curated investment products aligned to user maturity and risk profile.</p></li><li><p>Premium credit lines with clearly superior terms.</p></li><li><p>Tools for long&#8209;term wealth planning, tax optimization, and goal&#8209;based investing.</p></li><li><p>Access to alternative assets and structured products typically not marketed to the average retail user.</p></li></ul><h3>B. Embed genuinely sticky financial services</h3><p>The goal is to become the <strong>primary financial cockpit</strong> for this user segment.</p><p>That means:</p><ul><li><p>A consolidated dashboard of cards, loans, investments, and liabilities.</p></li><li><p>Intelligent nudges not just to spend but to save, invest, rebalance, and de&#8209;risk.</p></li><li><p>Monetization via:</p><ul><li><p>Advisory or subscription fees.</p></li><li><p>Asset&#8209;under&#8209;management-based income.</p></li><li><p>Premium credit lines and structured lending products.</p></li></ul></li></ul><p>Here, the revenue comes not from selling &#8220;stuff&#8221;, but from <strong>helping users manage and grow their money</strong>.</p><h3>C. Make the value exchange explicit: and premium</h3><p>A high&#8209;score user with a solid financial profile does not want to feel like just another target in an ad funnel.</p><p>The platform must answer clearly:</p><blockquote><p>&#8220;Because you are financially disciplined, what can we help you do that others cannot access?&#8221;</p></blockquote><p>A smaller set of high&#8209;quality, high&#8209;relevance benefits will outperform an endless scroll of generic offers.</p><h3>D. Drive high margin, not just high volume</h3><p>Premium audiences justify premium economics. That requires:</p><ul><li><p>Tight tracking of unit economics per user.</p></li><li><p>Ensuring each reward, campaign, or partnership has a clear business case and high&#8209;value outcome.</p></li><li><p>Lending products built with rigorous risk controls and clear margin, not just vanity volume.</p></li></ul><h3>E. Scale without diluting the club</h3><p>Exclusivity can be maintained even while scaling, if you:</p><ul><li><p>Expand into adjacent segments that are still financially strong (entrepreneurs, business owners, high&#8209;earning professionals).</p></li><li><p>Create internal tiers (for example, a more &#8220;elite&#8221; layer on top of an already strong base) with radically differentiated benefits.</p></li></ul><p>The key is that growth should not come at the cost of the brand&#8217;s core promise.</p><div><hr></div><h2>Why CRED Still Feels Stuck in the &#8220;Gap Phase&#8221;</h2><p>CRED has done the hard work of:</p><ul><li><p>Building a brand.</p></li><li><p>Acquiring a desirable user base.</p></li><li><p>Owning a mind&#8209;share position as the app for &#8220;credit&#8209;worthy&#8221; people.</p></li></ul><p>But the <strong>monetization architecture</strong> has not yet fully caught up with that ambition.</p><p>Today, the experience still leans heavily on:</p><ul><li><p>Rewards.</p></li><li><p>Offers.</p></li><li><p>Consumer spending.</p></li></ul><p>and far less on:</p><ul><li><p>Long&#8209;term wealth.</p></li><li><p>Serious financial leverage.</p></li><li><p>High&#8209;margin financial relationships.</p></li></ul><p>Until that gap closes, the business will continue to feel like a <strong>premium wrapper around a discount</strong>&#8209;driven core.</p><div><hr></div><h2>The Way Forward for CRED and for Builders Watching It</h2><p>If CRED wants to live up to the mythology it created, the shift ahead is clear:</p><ul><li><p><strong>Re&#8209;position</strong> from a reward app with elite branding to a serious <strong>financial empowerment platform</strong>.</p></li><li><p><strong>Monetize</strong> through high&#8209;margin financial products and services, not just through deals.</p></li><li><p><strong>Use rewards as a hook</strong>, not the foundation of the business.</p></li><li><p><strong>Preserve exclusivity</strong>, even as it scales into adjacent premium segments.</p></li><li><p><strong>Be radically transparent</strong> about data, insights, and how they&#8217;re used to create value for users.</p></li></ul><p>For founders, technologists, and product leaders, there&#8217;s a broader lesson here:</p><blockquote><p>Aggregating a great user base is only half the game.<br>Architecting a monetization model that genuinely respects who those users are. and what they actually need. is the other half.</p></blockquote><div><hr></div><h2>Conclusion</h2><p>CRED began as an ambitious attempt to build an exclusive club for India&#8217;s most financially disciplined consumers. On that front, it has achieved something rare: a brand that people recognize and a user base that most financial institutions would love to own.</p><p>But <strong>brand and user base are inputs, not outcomes</strong>.</p><p>The next phase demands an equally thoughtful <strong>monetization engine</strong>. one that treats high&#8209;credibility users not as a crowd to be sold discounted products, but as partners in long&#8209;term financial growth.</p><p>Whether CRED can make that leap. from rewards&#8209;driven engagement to genuine financial empowerment. will define its real legacy. If it gets this right, it will finally become what it hinted at in the beginning: not just another app on your phone, but the closest thing India has to a true, modern, digital &#8220;black card&#8221; experience for the financially disciplined.</p><div><hr></div><p><em><a href="https://www.linkedin.com/in/navneetsinghlall/">Navneet Singh</a> is the Founder &amp; CEO of Webority Technologies. He writes about engineering-first approaches to building technology companies.</em></p>]]></content:encoded></item></channel></rss>