mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(cron): pass skip_context_files=True to AIAgent in run_job (#7958)
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.
This commit is contained in:
parent
8c3935ebe8
commit
b53f681993
1 changed files with 1 additions and 0 deletions
|
|
@ -722,6 +722,7 @@ def run_job(job: dict) -> tuple[bool, str, str, Optional[str]]:
|
||||||
provider_sort=pr.get("sort"),
|
provider_sort=pr.get("sort"),
|
||||||
disabled_toolsets=["cronjob", "messaging", "clarify"],
|
disabled_toolsets=["cronjob", "messaging", "clarify"],
|
||||||
quiet_mode=True,
|
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
|
skip_memory=True, # Cron system prompts would corrupt user representations
|
||||||
platform="cron",
|
platform="cron",
|
||||||
session_id=_cron_session_id,
|
session_id=_cron_session_id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue