The CFO Engineer
← All resources

How I close my AI work sessions to keep the context updated and improve how we work together

Eduardo Guevara · CFO Engineer

I have built a living context architecture that captures my emails, my client calls, my documents, my deliverables. Another rich information (that I used to undervalue) is the work session itself. When a session with the agent ends, the context window dies, and everything we figured out that was not written somewhere dies with it.

A few weeks ago, I wrote here that the inbox is not the context. Same principle, other side: the work sessions is not the memory.

The hole in the net

My architecture captures external flows as they arrive. Every processing skill writes into the context: a call transcript updates the mission state, an email lands in the mission log, a document gets indexed.

But a work session is not one task. It ramifies. In three hours with the agent we may touch four different skills, take two decisions, abandon one approach, correct a wrong assumption, and land on a position nobody planned at the start. The thinking evolves inside the conversation itself.

And the most representative case: a pure reflection session. Strategy, positioning, design of a new workflow. No processing skill gets triggered, so nothing gets written. Something true came out of the session, and the architecture never saw it.

The closing ritual

So the session became a source like the others, with its own processing. At the end of a working session, I instruct "close the session". One skill runs. It is a markdown file in natural language. It writes three things.

First, a detailed session file, one per session, in a dedicated sessions-duo folder of the working directory. Fixed template: starting point, landing point, the path the thinking took (the pivots and why), inputs I gave, outputs produced, timeline, coordination learnings, open threads.

Second, a short entry at the top of a chronological inventory file. One inventory per working folder, most recent session first. Months later, I scan one file and I know what happened in this folder and when.

Third, a sweep of the context files. The skill rereads the mission state and the logs in the light of the session, and writes in what holds true at the end and was not yet captured. This is the safety net for the reflection sessions that triggered nothing.

I trigger it, at the end, when I decide the session is worth closing. A session that produced nothing durable does not get the ritual applied.

Two different memories

The session journal answers one question: how did we work.

The context files answer another: what is true today.

These are two different memories and they must not contaminate each other.

The path the thinking took, the options we explored and dropped, the false starts, all of that stays in the journal. Only the final position enters the context. If you let the narrative leak into the context files, the context fills up with story and rots. The agent then reads three pages of "we considered X, then moved to Y" to extract one fact.

The rule is written in the skill itself: the context records what holds true at the end of the session, never the journey. The journey has its own home.

A second improvement loop, on the collaboration itself

Each of my skills already has its own learning loop: I adjust an output, the adjustment feeds back into the skill. That loop improves the deliverables.

The session journal carries a different loop. One section of the template is called coordination learnings, and its definition is deliberately restrictive: preferences I revealed while working, errors the agent made and I corrected, collaboration patterns that worked or failed. Not business insights, not methodology, those live elsewhere. Only the way we work together.

The skill even has an anti-filler rule: if nothing notable happened on coordination, the section says "nothing notable for this session". An honestly empty section beats generic filler that buries the real signals.

Over weeks, these entries accumulate into a map of frictions. Each friction is treatable: fix a skill, create one, change a practice, change how I phrase my instructions. The system does not only improve what it produces. It improves how we produce it.

Hygiene, connected but separate

Closing is not cleaning. At the end of the ritual, the skill checks a few thresholds and flags them: a mission log growing past its size budget, a pending reply older than three weeks, a file missing from the index. It signals, it does not fix.

The fixing belongs to a separate weekly hygiene pass: compress, purge what is settled, verify the state file is fresh, audit one slice of the context for coherence. Division of labor: the closing is the checkpoint, the hygiene pass is the maintenance. Mixing them would make the closing too heavy to actually run.

The limit: my exploitation loop is too long

Here is what does not work yet.

The capture side is solid: frictions and learnings get consigned session after session. But I only really process them at the end of a mission, in the post-mortem, when I update skills and methodology in one batch. A mission lasts months. That iteration loop is far too long: a friction identified in week 2 can keep costing me until week 20.

I am looking for the right intermediate cadence. Monthly harvest? Attached to the weekly hygiene pass? I do not want one more ritual that looks good on paper and dies in three weeks. The constraint is real: the value of the loop depends on it actually running.

The CFO Engineer newslettercoming soonHow a CFO builds and runs agentic systems to turn raw data into decisions.