Skip to content

Daily distillation debrief target path is ambiguous and can corrupt current-day working logs #5

@Suidge

Description

@Suidge

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:

  1. Daily distillation runs at 03:00 on 2026-03-25
  2. The agent writes its own task report into memory/2026-03-25.md
  3. It then archives memory/2026-03-24.md
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions