From b53f6819937533acf749fa961063687ca813b0f1 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sat, 11 Apr 2026 14:48:58 -0700 Subject: [PATCH] fix(cron): pass skip_context_files=True to AIAgent in run_job (#7958) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cron jobs run from whatever directory the scheduler process lives in (typically the hermes-agent install dir), so without this flag the agent picks up AGENTS.md, SOUL.md, or .cursorrules from that cwd — injecting irrelevant project context into the cron job's system prompt. batch_runner.py and gateway boot_md already pass skip_context_files=True for the same reason. This aligns cron with the established pattern for autonomous/headless agent runs. --- cron/scheduler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cron/scheduler.py b/cron/scheduler.py index 0e04fb047..870ebe141 100644 --- a/cron/scheduler.py +++ b/cron/scheduler.py @@ -722,6 +722,7 @@ def run_job(job: dict) -> tuple[bool, str, str, Optional[str]]: provider_sort=pr.get("sort"), disabled_toolsets=["cronjob", "messaging", "clarify"], quiet_mode=True, + skip_context_files=True, # Don't inject SOUL.md/AGENTS.md from scheduler cwd skip_memory=True, # Cron system prompts would corrupt user representations platform="cron", session_id=_cron_session_id,