Sending an entire conversation on every turn eventually slows requests, raises cost, and crowds out the instructions that define a companion. Sending only the latest message is fast but loses continuity.
The current request builder takes the last 14 history items, then adds compact local memory and relevant topic context through separate paths. Recency and long-term recall are therefore allowed to solve different jobs.
What was actually going wrong
A single unbounded history array was being asked to provide both immediate conversational flow and durable identity continuity.
What I tried
- Sending every stored message with each request
- Keeping only the current user message
- Using a summary as a complete replacement for recent dialogue
A `slice(-14)` recent window is combined with filtered local memory, topic context, and the active companion prompt.
Why it worked
Recent wording stays intact while older material competes for inclusion by relevance instead of age alone.
Context windows work best as layers, not one ever-growing transcript.
Where EACI uses this today
Caelum, Chad, Natalia, Atreus, Luna, Roxy, and Cael receive bounded recent context plus their permitted memory layers.
This journal covers real engineering on EACI Companion / The Veil. Companions include Caelum, Chad, Natalia, Atreus, Luna, Roxy, and Cael. Journal articles stay family-safe in content. See Privacy and Ethics.