Skip to content

Memory

A desk remembers at four time scales. The table below lists them from the shortest to the longest.

Layer Kept in Lasts
The conversation The model's context, and the session log Until it is compressed, or the day ends
The session sessions/<day>-<number>.jsonl, one per trading day Searchable for ever
Notes notes/<day>.md, one to three lessons after a turn Folded into Memory.md at the rollover
Memory.md The desk's lasting lessons, read at every turn Until the desk or you change it
Sessions, memory and checkpoints The session keeper resumes or rolls over each desk session; memory tools write the desk files, and every write is checkpointed first. One desk, such as main Trigger a message, a job, an alert or a fill 1 Session keeper New India date? The desk folds its notes into Memory.md and summarises the day; a fresh session starts. New session? The last summary goes in front. 2 Model router Runs the turn on the first ready model, then saves the exchange and Claude's session id. After a restart it reloads them: Claude resumes, the others get a hand-over. 3 Memory tools add_note · write_file · edit_file take a checkpoint, then write search_sessions reads the journal, summaries and notes Claude · Qwen · Gemma each turn, and the end-of-day summary turn, runs here Session store sessions/state.json sessions/2026-10-19-1.jsonl sessions/summaries/2026-10-19.md Checkpoints workspace/.checkpoints/main.git The desk's own files Memory.md · memory/ · notes/ Journal journal/YYYY-MM-DD.jsonl a turn going out, an exchange saved, a note written an answer, a restore after restart, a search
The session keeper resumes or rolls over the desk's session before each turn; the memory tools write the desk's own files, and every write is checkpointed first. The blue dots are what comes back from the session store and the journal.

Restarts and the daily rollover

When the gateway starts, each desk resumes the session it saved. At 15:45 on trading days, and at the first turn of a new day if the gateway was down, the desk summarises the day, folds its notes into Memory.md, and starts a fresh session whose first message carries the summary. The summaries are on the Sessions page.

Searching the past

search_sessions lets a desk ask its own past, such as "what did I do last time NIFTY gapped down?". It searches earlier exchanges, daily summaries, notes, and the journal of orders, refusals and fills. The Sessions page offers the same search.

Checkpoints

A snapshot of the desk's own files (Memory.md, memory/, notes/ and its own skills) is taken before every change, by the desk, the curator or you, in a git repository of its own at workspace/.checkpoints/<desk>.git. Restoring one snapshots the current files first, so a restore can itself be undone. Your own files are not part of it.

Context compression

A model's context window is finite. Past 70% of it, before the next turn, the desk first gets a silent turn to save what matters to its memory, and then the older part of the conversation is replaced by a summary. Past 85% in the middle of a long turn, the conversation is compressed at once, without the flush.

Context compression Past 70% of the context window, the desk first saves what matters in a memory-flush turn, then the conversation is summarised and the turn runs on a fresh one. Before each turn of Qwen or Gemma Next trigger a message, a job, an alert or a fill 1 Past 70% of the window? the server's token count at the last call, plus an estimate for tool results since 2 Memory-flush turn "save what you will need": add_note and Memory.md; no orders in this turn 3 Summarise the conversation the same model, no tools, from a transcript that marks shortened tool results 4 Run the turn on a fresh conversation the summary, then the new trigger; past 85% mid-turn, compress again without a flush The desk's own files Memory.md · notes/ Qwen · Gemma writes the summary, then answers the trigger in far fewer tokens Claude, the same idea at 70%: the flush turn, then Claude Code's /compact safety net: Claude Code compacts by itself at 817,000 of 1,000,000 tokens One 32,768-token window, as Qwen and Gemma have it instructions and tools: about 6,200 + one candles question: about 1,600 70%: flush, then summarise 85%: compress mid-turn the check, the flush, a request to the model the summary, then the answer
Compression for Qwen and Gemma: the memory-flush turn writes to the desk's own files, the conversation is summarised, and the turn runs on the fresh conversation. Claude does the same through Claude Code's own compaction, with a flush first.

On 17 October 2026, Qwen kept RELIANCE's price and INFY's high and low through a compression, and Claude kept a 0.8% stop preference through /compact.