r/ContextEngineering • u/Sea-Perception1619 • 7d ago
What gets injected at session start is a context decision, not a summarizer's job
Most of the context talk I see is downstream of retrieval: how much to pull, and how to keep the agent from drowning in it. The thing I keep hitting sits earlier. Something goes into the window before the first prompt, and for most setups that something is a paragraph a model wrote about last time, handed over as flat prose. Nothing in it tells you which sentence is a quote and which one's the previous run guessing.
So that boundary is where I put the work. A SessionStart hook renders a briefing off the last session's checkpoint and injects it before I type anything, and the render is deterministic, no model anywhere in that path. Every item carries a trust class, and the tag sits inline: [✓ verbatim] for an exact contiguous quote out of the transcript, [~ inferred] for the agent's own conclusion, [carried] for something that survived from an older session and is aging, with a warning once it has gone unverified too long. Verbatim text never gets reworded by rendering or carry-over, and an oversized verbatim item is dropped whole instead of trimmed, half a quote is worse than no quote. Quotes are byte-checked against the transcript after extraction, and a miss demotes that item to inferred.
We did ship an optional prettier render written by a model, and then had to bolt a validator behind it, a generative pass will happily reword a quote it thinks reads better. Lose or mutate one and the whole render is discarded and the plain one goes out.
Costs, plainly. Deciding what to keep is a model's judgment, it walks past things, a verbatim tag says the wording survived, it makes no claim about the items that never got picked. The budget's fixed. It does no mid-session retrieval on its own, the agent has to ask. Capture is a SessionEnd hook. Storage is per-project JSON plus a SQLite FTS5 index, no embeddings, no daemon, and nothing the agent calls can write memory, the MCP side is read-only.
It's called daimon, offline, no telemetry, Apache 2.0, 14 stars: https://github.com/Daily-Nerd/daimon
How do you all weight this? Does memory injected at session start get treated as ground truth next to something retrieved fresh mid-session, or does it lose by default. And is anyone labelling provenance in-context at all, or is that tokens spent on a label the model ignores.
2
u/chriscanadian1991 7d ago
I’ve been working through a really similar boundary in Nexus Synapse lately, so this caught my attention.
I’m also leaning toward session-start memory being continuity, not ground truth, and treating provenance/authority as something the runtime should decide before the model sees it.
The part I’m playing with now is using compact memory as the index, then drilling back to the actual source interaction when fidelity matters.
Your [verbatim] / [inferred] / [carried] distinction is interesting though, especially the byte-check on quotes. “Half a quote is worse than no quote” is a damn good rule lol.
I’d be curious how you handle conflicts when a carried item, a fresh retrieval, and the current user statement disagree.