Problem
The current distillation.md instruction contains this line:
Before completing, append debrief to memory/YYYY-MM-DD.md.
This is ambiguous for the daily distillation cron that runs around 03:00.
At runtime, the agent may interpret YYYY-MM-DD as the execution day instead of the day being distilled (yesterday).
Observed bad behavior
We reproduced the following failure mode in a real OpenCortex installation:
- Daily distillation runs at 03:00 on
2026-03-25
- The agent writes its own task report into
memory/2026-03-25.md
- It then archives
memory/2026-03-24.md
- Result: the current-day working log path is polluted by a distillation report, and the previous day’s actual working-log semantics are broken
This caused two consecutive days of corrupted daily-memory flow (2026-03-24 and 2026-03-25).
Expected behavior
The debrief should be appended to the archived file for the day being distilled, not to today's working log.
Suggested wording:
Before completing, append a brief debrief to memory/archive/YYYY-MM-DD.md (the file you just archived for the day being distilled, i.e. yesterday's daily log).
Do not write the distillation debrief into today's memory/YYYY-MM-DD.md.
Why this matters
OpenCortex architecture defines:
memory/YYYY-MM-DD.md = current day working log
- nightly distillation = read yesterday's daily log → route knowledge → archive it
So writing the distillation debrief into today's memory/YYYY-MM-DD.md breaks that contract.
Notes
This appears to be an instruction ambiguity / prompt bug, not necessarily a code bug.
We already patched our local distillation.md with the wording above and it matches the intended architecture much better.
Problem
The current
distillation.mdinstruction contains this line:This is ambiguous for the daily distillation cron that runs around 03:00.
At runtime, the agent may interpret
YYYY-MM-DDas the execution day instead of the day being distilled (yesterday).Observed bad behavior
We reproduced the following failure mode in a real OpenCortex installation:
2026-03-25memory/2026-03-25.mdmemory/2026-03-24.mdThis caused two consecutive days of corrupted daily-memory flow (
2026-03-24and2026-03-25).Expected behavior
The debrief should be appended to the archived file for the day being distilled, not to today's working log.
Suggested wording:
Why this matters
OpenCortex architecture defines:
memory/YYYY-MM-DD.md= current day working logSo writing the distillation debrief into today's
memory/YYYY-MM-DD.mdbreaks that contract.Notes
This appears to be an instruction ambiguity / prompt bug, not necessarily a code bug.
We already patched our local
distillation.mdwith the wording above and it matches the intended architecture much better.