fix: OpenClaw plugin filters cron-initiated agent runs
OpenClaw scheduled tasks (DXF email watcher, calendar reminder pings) fire agent sessions with prompts that begin '[cron:<id> ...]'. These were all getting captured as AtoCore interactions — 45 out of 50 recent interactions today were cron noise, not real user turns. Filter at the plugin level: before_agent_start ignores any prompt starting with '[cron:'. The gateway has been restarted with the updated plugin. Impact: graduation, triage, and context pipelines stop seeing noise from OpenClaw's own internal automation. Only real user turns (via chat channels) feed the brain going forward. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,14 @@ export default definePluginEntry({
|
||||
lastPrompt = null;
|
||||
return;
|
||||
}
|
||||
// Filter cron-initiated agent runs. OpenClaw's scheduled tasks fire
|
||||
// agent sessions with prompts that begin "[cron:<id> ...]". These are
|
||||
// automated polls (DXF email watcher, calendar reminders, etc.), not
|
||||
// real user turns — they're pure noise in the AtoCore capture stream.
|
||||
if (prompt.startsWith("[cron:")) {
|
||||
lastPrompt = null;
|
||||
return;
|
||||
}
|
||||
lastPrompt = { text: prompt, sessionKey: ctx?.sessionKey || "", ts: Date.now() };
|
||||
log.info("atocore-capture:prompt_buffered", { len: prompt.length });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user