-
-
Notifications
You must be signed in to change notification settings - Fork 54.3k
Open
Description
Summary
post-compaction-audit.ts currently hardcodes default required reads to:
const DEFAULT_REQUIRED_READS = [
"WORKFLOW_AUTO.md",
/memory\/\d{4}-\d{2}-\d{2}\.md/,
];In real deployments, many workspaces do not have WORKFLOW_AUTO.md. This produces repeated post-compaction warnings about missing startup files and appears to correlate with unexpected session handoffs/new-session creation during heartbeat windows.
What we observed
- Repeated warning text after compaction:
- missing
WORKFLOW_AUTO.md - missing
memory/YYYY-MM-DD.mdregex match when daily file didn't exist yet
- missing
- Repeated
readENOENT errors in gateway logs forWORKFLOW_AUTO.md. - Overnight heartbeat/session churn around those warning windows.
Why this is problematic
WORKFLOW_AUTO.mdis treated like a required sentinel but is undocumented and absent by default in many user workspaces.- Required-read checks are strict-equality path checks; missing file can create persistent warning loops.
- This can be interpreted by users as agent/session instability even if core runtime is healthy.
Proposed fix
- Do not hardcode
WORKFLOW_AUTO.mdas required by default.- Make it optional, or
- Gate it behind existence check (
if file exists in workspace, then require read), or - Move required-read list fully to config with safe defaults.
- Keep daily-memory regex check but consider allowing a grace window if today's file doesn't exist yet.
- Improve audit messaging to distinguish:
- "required file missing from workspace" vs
- "required file exists but wasn't read"
Suggested acceptance criteria
- Fresh workspace with no
WORKFLOW_AUTO.mddoes not trigger perpetual post-compaction missing-file warnings. - Post-compaction audit only requires files that exist or are explicitly configured.
- No repeated ENOENT spam for audit-required files that are absent by design.
Relevant source
src/auto-reply/reply/post-compaction-audit.ts
Thanks — happy to test a patch quickly once available.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels