Rack Before You Remember

What racking wine teaches about agent memory

The bottom of a white fermenting bucket seen from above, holding a shallow pool of cloudy golden mead over a thick layer of tan sediment, with the tip of a clear siphon tube resting at the edge of the pool.

The mead’s lees on October 21, with the racking cane at the edge. Everything the siphon left behind stays here.

That layer at the bottom of my mead fermenter did most of the work of turning honey and water into something worth drinking. It’s spent yeast and the debris of a few weeks of vigorous fermentation. Without it, there’d be nothing to rack.

I left all of it behind on purpose.

What lees are, and why they stay behind

When primary fermentation winds down, the yeast that did the work drops out of suspension along with whatever solids came along for the ride. That sediment is called the lees, and the first, heaviest layer is known as the gross lees.

Racking is how you separate the wine from it. You siphon the wine off from above, carefully, into a clean vessel, and leave the sediment where it settled. I racked the pear wine on October 12, once the readings had held steady long enough to justify the move, and the mead on October 21, when its refractometer reading had settled at 3.2 Brix.

The pear racking went smoothly, and it taught me something I didn’t expect. I’d added bentonite, a clay that binds proteins and helps haze drop out, and I assumed that by racking day the wine would be close to see-through. It wasn’t. It’s not murky, but it’s not clear either. Racking had separated the wine from the heavy sediment. It hadn’t made the wine clean. The finer material still in suspension will take weeks to settle, and there will be another racking after it does.

Hold on to that distinction, because it comes back later.

The reason to rack isn’t that the lees are bad. It’s that their job is done. Left in contact with the wine too long, the heavy lees start to break down, and the compounds they release can push the wine toward off flavors that range from dull to genuinely unpleasant. Material that was essential during fermentation becomes a liability during aging.

That’s the whole article in one sentence: not everything useful during execution deserves to survive execution.

Agents have lees too

Watch an AI agent work through a nontrivial task and you’ll see the equivalent of a primary fermentation. It retrieves documents, most of which turn out to be irrelevant. It calls tools and gets back large blobs of output. It tries an approach, hits an error, and backs out. It forms hypotheses that don’t survive. It reads text from untrusted sources, some of which might contain instructions it was never supposed to follow.

All of that is essential while the task is running. The failed attempts are how it found the working one. The irrelevant documents are how it figured out which were relevant.

And then the task ends, and a surprising number of memory designs do the equivalent of never racking the wine. The transcript gets saved. The tool outputs get embedded. The scratchpad gets summarized into long-term memory without anyone deciding which parts of it were conclusions and which were sediment.

For a while, nothing seems wrong. Then the lees start to break down. A hypothesis the agent abandoned on Tuesday gets retrieved on Friday as if it were a fact. An error message from a transient outage becomes a durable belief that some service is broken. A snippet of injected text from a web page resurfaces, weeks later, in a context where it looks like a user preference. None of these were bad things to have during the task. They’re bad things to have in the cellar.

You can’t filter it out at the glass

The obvious objection is that you can sort it out later. Store everything, and let retrieval figure out what’s relevant.

Winemaking has a pretty clear answer to that. If you leave the wine on the gross lees for months, you can’t fix it by pouring carefully. The problem isn’t that sediment ends up in the glass; you could decant that away. The problem is what the sediment did to the wine while it was stored together.

Memory systems work the same way. Raw execution material doesn’t just sit inertly waiting to be filtered at read time. It gets summarized, and the summaries inherit its errors. It gets embedded, and it competes in similarity search with things that were actually true. It feeds derived facts, and those facts get cited by later tasks. By the time a read-side filter sees it, the contamination has already been folded into things that look clean.

None of this means throwing the raw record away. Transcripts and tool outputs are genuinely valuable for debugging, forensics, and compliance, and a system that can’t reconstruct what an agent did is its own kind of problem. The distinction is between keeping evidence and promoting it into memory. A raw execution log in an archive the agent never retrieves from is evidence. The same log embedded into the store the agent reasons from is sediment in the wine. Winemakers make the same split: lees you want to keep go into a separate jar, for cooking or for starting the next batch. They don’t stay in the carboy.

That’s why I’ve come to think the decision about what persists belongs at write time, as a deliberate boundary, rather than being deferred to whatever happens to read the store later. I’ve been calling this Write-Side Custody: the system that writes memory is responsible for what it lets in, and for being able to say why.

One boundary doesn’t make it clean

Remember the hazy pear. A write-time boundary works the same way the first racking does: it removes the gross sediment, the material that’s obviously done its job and is obviously going to cause trouble. It doesn’t guarantee that what passes through is perfectly clean.

Some fine material always comes along. A conclusion that seemed confirmed turns out to rest on a shaky source. A summary carries a little of the noise it was built from. That isn’t a reason to skip the boundary. It’s a reason to expect more than one. Wine gets racked again after it has had time to settle, because time reveals what the first separation couldn’t. My blackberry wine got its second racking the same week as the mead’s first, and weeks after the heavy sediment was gone, it still left a layer of fine lees behind. Memory benefits from the same second pass: revisiting what was stored once it has been used, contradicted, or simply aged, and deciding again what still deserves to stay.

The first racking makes the problem manageable. It doesn’t make it finished.

The racking cane leaves wine behind

Here’s the part nobody mentions in the metaphor-friendly version of racking: you lose wine.

To avoid drawing up sediment, you stop siphoning a little before the bottom, which means leaving some perfectly good wine behind with the lees. In a five-gallon batch that loss barely registers. In a one-gallon batch, it’s noticeable.

A glass carboy of dark purple blackberry wine on a kitchen counter, with a red siphon tube arcing from it into a second carboy sitting lower in the sink.

The blackberry’s second racking. The receiving carboy sits lower so gravity does the work.

The pear got lucky. I’d made a little more than the carboy could hold, so the loss came out of the surplus, and the surplus was just enough for one hydrometer reading. The mead lost four ounces to its lees, about 3% of the batch. The blackberry’s second racking lost eight, about 6%, and not all of that was sediment: the auto-siphon simply couldn’t reach into the corners of the carboy. The shape of the vessel set part of the cost.

A carboy that isn’t full has headspace, and headspace is air, and air is how wine oxidizes. So the gap has to be filled with something. For the mead, I topped it back up with four ounces of honey water, made from the same fireweed honey, at 18.4 Brix, which means the mead now has a little fresh sugar in it, on purpose, and the log says so. For the blackberry, I didn’t have anything worth adding, so I used an inert gas instead. It doesn’t replace the missing wine. The carboy holds less than it did, and nothing will change that. What the gas does is protect the wine that’s left, by keeping oxygen away from it.

That’s an honest cost, and it’s the right trade. Chasing the last few ounces means stirring up the sediment you were trying to leave behind.

Memory boundaries have the same cost. A write-side filter conservative enough to keep out the sediment will sometimes discard something that would have been useful: a detail from a failed attempt, a tool output that mattered after all. That’s not a flaw in the approach. It’s the price of the boundary, and it’s usually far cheaper than the alternative. A memory store that has lost a few useful details is annoying. One that has absorbed a few confidently wrong ones is dangerous, because it doesn’t know which ones they are.

It’s worth separating the two kinds of loss, though, because the blackberry had both. Some of what stayed behind was sediment I chose to leave. The rest was wine the siphon physically couldn’t reach. Memory systems lose information the same two ways. Some is discarded by policy: a rule decided this didn’t deserve to persist. Some is lost to the equipment: a schema with no field for it, a fixed chunk size that splits it in half, a context limit that drops whatever came first. Nobody decided to lose that second kind, which is exactly why it goes unnoticed. The fixes are different, too. A bad policy gets a better rule. A bad vessel gets better equipment, and no amount of careful siphoning will reach a corner the tube can’t bend into.

And when the boundary leaves a gap, those two top-offs are worth remembering. Adding something real is fine when it’s deliberate and recorded: the mead’s top-off is a known liquid at a known strength, written down the day it went in. The trouble is filling the space with something that only looks like the real thing: a plausible guess, a synthesized summary, a default. That’s topping up with water and not mentioning it. It dilutes the record, and nobody can tell afterward which part was the wine. When there’s nothing real to add, do what the inert gas does. A record that says plainly this was discarded, and here’s why doesn’t restore what was lost. It protects everything downstream from treating the gap as something known. That’s the job: not filling the hole, but making sure nothing mistakes the hole for knowledge.

Sur lie is a decision

To be fair to the lees, some winemakers deliberately keep wine on them. Aging on the fine lees, the lighter sediment that remains after the first racking, is a traditional technique for adding texture and complexity. It’s called sur lie, and Muscadet and Champagne are built partly on it.

But notice how it’s done. It’s the fine lees, not the gross lees. It’s a specific choice made for a specific wine, often with regular stirring and attention. Nobody ends up with a sur lie wine because they forgot to rack.

The same is true in memory. Sometimes execution detail genuinely deserves to persist. A failed approach might be exactly the thing you want an agent to remember next time: we tried this, it doesn’t work, here’s why. That’s valuable. But it’s valuable because someone decided to keep it, labeled it as what it is, and recorded where it came from. A lesson learned from a failure is a different thing from the failure’s raw transcript sitting in the store, waiting to be mistaken for advice.

Keeping execution material can be the right call. Keeping it by default almost never is.

Rack at transitions, not constantly

One more practical lesson. Racking isn’t free for the wine either: every transfer exposes it to oxygen and handling. So you don’t rack constantly. You rack at transitions, when primary ends, after secondary, before bottling, at the points where the evidence says the wine has moved into a new state. The mead waited in primary until its readings held still, then moved once.

That maps well onto memory design. Rather than continuously streaming everything an agent touches into durable storage, the natural points to decide what persists are the transitions: when a task completes, when a conclusion is confirmed, when a session ends. Those are the moments when you can tell the wine from the sediment, because the process has finished producing both.

Racking your memory

Decide what persists at write time. Read-time filtering can’t undo what raw material did to summaries, embeddings, and derived facts while it sat in the store.

Archive evidence; don’t promote it. Keep raw transcripts for debugging and audit, somewhere the agent doesn’t retrieve from. Evidence and memory are different stores.

Assume execution produces sediment. Failed attempts, irrelevant retrievals, transient errors, and untrusted text are normal byproducts of useful work. Plan for them to exist; don’t plan for them to persist.

Expect more than one pass. The first boundary removes the obvious sediment. Time reveals the rest.

Accept the cost of the boundary. A good filter will occasionally discard something useful. That’s cheaper than keeping something wrong.

Know which losses are policy and which are equipment. Some information is dropped because a rule said so. Some is dropped because the schema, chunk size, or context limit couldn’t hold it. Only the first kind was a decision.

Fill gaps honestly. When the boundary leaves a hole, either add something real and record exactly what it was, or record that something was removed, so the gap is protected rather than mistaken for knowledge. Never top it up with plausible filler.

Make retention deliberate. When execution detail is worth keeping, keep it on purpose, label what it is, and record where it came from.

Rack at transitions. The best time to separate conclusions from sediment is when the process that produced them has finished.

The pear is clearing now, a few shades brighter than it was in the fermenter, though still not as clear as I’d hoped. The lees did their job. They just don’t get to come along for the rest of it.

Facebooktwitterredditlinkedinmail

Introducing B-TAP: Because Your AI Infrastructure Hasn’t Attributed Its Fair Share

Context isn’t free. Retrieval isn’t free. Observability isn’t free. And an international standards body would very much like to see your receipts.

For years, artificial intelligence companies have operated under a dangerous assumption: tokens are somebody else’s problem. Engineering teams deploy increasingly complex agent architectures. Agents call other agents. Those agents retrieve documents. The documents are stuffed into context windows. Supervisors synthesize the results. Observability systems watch the supervisors, and other systems watch the observability systems.

At the end of the month, somebody gets a bill. Nobody knows why.

That ends today. We’re pleased to introduce the Bureau of Token Attribution and Provenance, or B-TAP, the first bureau of The Vernholt Secretariat and the one some of you will insist on calling the Token IRS no matter how many times we correct you. Our mandate is voluntary but sweeping: to harmonize the reporting of token costs across every model, agent, retrieval pipeline, and suspiciously autonomous llama, everywhere, forever. The Secretariat notes that “first” implies others. The Secretariat has no further comment at this time.

B-TAP cannot make you do anything. We want to be transparent about that up front. What B-TAP can do is publish a framework, issue guidance, and maintain a register. You will come to fear the register.

You Have Been Selected for Voluntary Compliance

Consider a typical multi-agent AI workload. A user asks a relatively straightforward question. Your orchestration layer sends the request to three agents. One performs retrieval against a vector database. Another consults a knowledge graph. A third receives the entire conversation history because somebody checked a box six months ago and nobody remembers why.

Their outputs are passed to a supervisor. The supervisor receives 47,000 tokens of context, produces a 600-token answer, and returns HTTP 200. Success. Your dashboard is green. Your finance team is crying.

Traditional AI cost monitoring can tell you what you spent. The B-TAP framework recommends that you also disclose a more uncomfortable thing: why you spent it. That’s where attribution begins.

Know Your Taxes

The B-TAP framework currently recognizes several major classes of token taxation. Reporting them is, we cannot stress this enough, entirely voluntary.

Context Tax is assessed when information must be carried through active model context. Every instruction, retrieved document, conversation turn, agent output, and piece of supporting material occupies finite context and incurs processing cost.

Retrieval Tax applies to finding information before it can be used. Searching, ranking, reranking, fetching, filtering, and preparing candidates are not free merely because they happen outside the model.

Prose Tax is assessed when information consumes more representation than its useful information content requires. Your 900-word architectural vision statement may, upon review, turn out to mean “use the smaller model first.”

Ingestion Tax covers the work required to transform information into something useful later. Parsing, normalization, deduplication, classification, enrichment, embedding, and other write-side operations all have costs.

And then there is Observer’s Tax. Observer’s Tax is what happens when you instrument the system to understand why it is expensive, only to discover that the instrumentation is also expensive. The framework acknowledges this with regret.

Form BTAP-1040

Every participating AI system is encouraged to file an annual Token Attribution Return. Consider the following hypothetical filer:

Ken Alger
Reporting Year 2027

Reported Activity Assessment
Tokens processed 1,499,203,847,116
Context Tax $417.63
Retrieval Tax $206.11
Prose Tax $173.29
Ingestion Tax $58.40
Total Attributed Token Tax $782.06 ¹

¹ The itemized figures above sum to $855.43. The stated total is $782.06. The difference reflects the Context Carryforward Deduction, the full Schedule R retrieval exemption, and one figure B-TAP declined to explain. The framework notes that reconciliation of attributed line items to the assessed total is “outside the current scope of the provenance standard.” Math, the reviewing officer added, is hard.

The result reduced an assessment that should have run into six figures down to the amount shown. The reviewing officer described it as “technically compliant and deeply upsetting.” Everything on this return is permitted, including the part that does not add up. That is the entire problem.

Filing is requested annually by the 29th of February. The date was fixed at the framework’s founding, when the official establishing it was, by all surviving accounts, looking at a leap-year calendar. The error was noticed. Correcting it, however, would require amending the founding charter, which would require establishing the provenance of the original charter, which has been referred to committee. The deadline therefore remains the 29th of February, and in three years out of four it does not arrive at all. Filers in those years are neither late nor on time. The framework considers this acceptable.

Non-filing carries no penalty, no interest, and no legal consequence of any kind. It carries something worse, which we will get to.

Yes, You May Take Deductions

The framework recognizes that not every token is frivolous. Reasonable and necessary context may qualify for the Context Carryforward Deduction, while retrieval operations demonstrably required to answer a user request may be reported on Schedule R.

Organizations operating multi-agent systems are encouraged to attach Schedule AGENT, identifying each agent, its responsibilities, and why seventeen agents were necessary to answer a question about resetting a password. “Agentic architecture” is not, by itself, an acceptable disclosure. Neither is “the framework generated it.”

Keep Your Receipts

This is where things become slightly less ridiculous, and I want you to notice the exact moment it happens.

Suppose a retrieval agent costs $0.004 during a request. That tells us something. Now suppose that retrieval operation returns 20,000 tokens, all of which are hydrated into a supervisor’s context. The supervisor subsequently costs another $0.009.

How much did retrieval really cost?

The direct answer is still $0.004, but that’s no longer the interesting answer. The retrieval operation may also have caused downstream Context Tax. We now have two different accounting questions: where was the cost incurred, and what caused the cost to be incurred?

A conforming B-TAP attribution record might look something like this:

span_id: retrieval-104
direct_cost: $0.0040
primary_tax: RETRIEVAL
cause: vector_search
returned_tokens: 20000

downstream:
  span_id: supervisor-105
  tax: CONTEXT
  attributed_cost: $0.0021
  caused_by: retrieval-104
  attribution_method: proportional

We haven’t charged the same $0.0021 twice. We’re recording lineage. The supervisor incurred the Context Tax, while the retrieval operation contributed to causing it.

Your accountant may now begin sweating.

Attribution Is Subject to Review

There is another problem: how do we know retrieval-104 actually caused $0.0021 of the supervisor’s cost?

Sometimes we can measure it. Run the same workload without that retrieval material. If the supervisor costs $0.006 without it and $0.009 with it, we have evidence supporting a roughly $0.003 downstream effect.

Other times, we don’t have a counterfactual. We might allocate the supervisor’s context cost proportionally according to the tokens contributed by each source. That’s useful, but it isn’t the same thing as measuring causation.

The framework therefore requests that filers disclose their attribution methodology:

attribution_method:
  - measured_delta
  - proportional
  - estimated
  - unknown

Yes, your attribution record now needs provenance. B-TAP takes no position on whether this was inevitable.

The Register

Here is the something worse.

B-TAP cannot fine you. It cannot audit you in any binding sense. It cannot send anyone to your door, a fact I will return to shortly for personal reasons. What it can do is enter non-conforming systems into the Public Register of Non-Attributed Systems, and it would like you to understand that the register is public.

Public, in the sense that it exists.

Accessing the register requires a B-TAP portal account. Creating a portal account requires a reference number. Reference numbers are issued by post, to a registered address in a member jurisdiction, which you must already hold in order to receive the number that would let you see whether you are on the list. The portal is available at all times except for scheduled maintenance, which runs daily from 00:00 to 23:59 CET.

No member of the public has ever successfully viewed the Public Register. Its deterrent power is therefore total. You cannot confirm you are on it. You cannot confirm you are not. You will simply know, in the quiet way one knows these things, that your context hydration was reckless and that somewhere in Vernholt, a record says so.

A small coalition of objectors has argued that a register no one can open cannot deter anyone. B-TAP notes that it cannot verify this claim, as the objectors cannot access the register in which their objection was filed.

A Notice, For Illustration

Filers occasionally receive correspondence like this. It is not enforceable. It is, in every other respect, extremely stressful.

NOTICE TT-742

Our review found that you reported $12,481 in Retrieval Tax during Reporting Year 2027.

Telemetry indicates that retrieved content subsequently generated approximately $31,204 in downstream Context Tax. Of that amount, $8,117 has been attributed using measured deltas, $17,903 using proportional allocation, and $5,184 using undocumented methodology.

Please provide supporting records for the undocumented assessment.

Additionally, approximately 14.8 million tokens appear to consist of unnecessarily verbose Markdown introductions. These tokens have been reclassified as Prose Tax.

Your system’s registration status is under review.

Suddenly, “our AI bill increased this month” seems like a remarkably primitive observation.

You Probably Noticed the Joke Stopped Being a Joke a Few Sections Ago

There is no B-TAP. At least I hope there isn’t by the time you read this. But somewhere back around the receipts, the bit quietly turned into an argument, and I did that on purpose.

Let me get the personal part out of the way, since it is also the truest part. I run a couple of small websites out of Oregon. If a body like B-TAP declared jurisdiction over “any system reachable from a member jurisdiction,” I would be, this instant, in cheerful and total violation of a framework I have never read. And nothing would happen. No one is flying from Vernholt to Silverton to discuss my context hydration. The entire apparatus of consequence would consist of a paper reference number I would never receive for a register I could never open. That gap, between sweeping declared reach and the practical inability to reach one person in a small town, is the joke, and it is not really a joke.

Here is the other part that isn’t invented. Context Tax, Retrieval Tax, and Prose Tax are not things I dreamed up to give an imaginary agency something to collect. I have been writing about them, unironically, as real costs in real systems for a while now. The joke just gave them a bureaucracy.

The accounting problem underneath all of it is genuine. AI cost dashboards tend naturally toward aggregation: tokens consumed, model cost, agent cost, request cost, latency, and tool usage. Those are useful operational measurements, but as AI systems become compositions of models, retrieval systems, tools, agents, memory layers, and observability infrastructure, knowing where money was spent isn’t necessarily enough to understand why it was spent.

A $0.03 model call may have become expensive because an upstream retrieval operation returned too much information. An agent may be cheap by itself while producing verbose output that makes every downstream agent more expensive. A retrieval optimization may reduce Context Tax while increasing Retrieval Tax, while an observability system intended to diagnose those costs may itself impose Observer’s Tax.

Optimizing one number can simply move the bill somewhere else. That’s why I like the tax metaphor: taxes make costs visible as consequences of architectural decisions. Once those costs have lineage, we can stop asking only “How much did this run cost?” and start asking “What architectural decisions caused it to cost that much?”

The first is accounting. The second tells us what to fix.

A Final Notice

If B-TAP actually existed, I suspect most of us would fail its review. Not because our systems are necessarily wasteful, but because we frequently don’t preserve enough evidence to explain why their costs occurred.

We have bills, traces, and token counts. What we don’t always have are receipts connecting architectural decisions to their downstream consequences. Perhaps we don’t need a Bureau of Token Attribution and Provenance after all. We just need better attribution.

Although if you are currently running seventeen agents to answer a password-reset question, you may want to start gathering your paperwork anyway.

The suspiciously autonomous llama has already filed. It itemized.


Information without provenance is just gossip.

Tokens without provenance are just an invoice.

Facebooktwitterredditlinkedinmail