Skip to content

fix(cron): skip context files for scheduled jobs - #7696

Closed
hughpyle wants to merge 1 commit into
NousResearch:mainfrom
keepnotes-ai:fix/cron-skip-context-loading
Closed

fix(cron): skip context files for scheduled jobs#7696
hughpyle wants to merge 1 commit into
NousResearch:mainfrom
keepnotes-ai:fix/cron-skip-context-loading

Conversation

@hughpyle

@hughpyle hughpyle commented Apr 11, 2026

Copy link
Copy Markdown

Fixes #5209 (at least, fixes "cron jobs fail timeout", which is a reported symptom)

Problem

  • The overnight cron jobs failed instead of delivering their reports.

Why 1

  • Because the scheduler killed them for inactivity timeout.

Why 2

  • Because the jobs spent too long doing non-essential context/workspace discovery instead of the actual task.

Why 3

  • Because cron-created agents were still allowed to load or chase local project context:
    • repo-local AGENTS.md / SOUL / memory-file discovery
    • and in one news run, an AGENTS.md file search escalated all the way to path "/"

Why 4

  • Because the cron agent setup did not set:
    • skip_context_files=True
  • so scheduled jobs inherited normal interactive agent behavior that makes sense for coding sessions, but not for tiny scheduled tasks.

Why 5

  • Because cron was using the same broad default agent posture as normal conversations, without sufficiently constraining startup context behavior for automation.

Root cause

  • Cron jobs were not isolated from interactive project-context discovery.
  • That allowed wasteful local context/tool behavior, which led to long stalls and inactivity timeouts.

Two concrete manifestations

  • Watcher cron:
    • wandered into AGENTS/SOUL/local memory-style inspection before checking GitHub Actions
  • News cron:
    • explicitly searched "/" for AGENTS.md, which is a terrible idea in a cron run

Fix:

  • Skip the context files for cron jobs, light and breezy lemon squeezy

@hughpyle
hughpyle force-pushed the fix/cron-skip-context-loading branch from 44eded1 to eda1c4b Compare April 13, 2026 01:30
@hughpyle

Copy link
Copy Markdown
Author

closing, done in #7958

@hughpyle hughpyle closed this Apr 13, 2026
@hughpyle
hughpyle deleted the fix/cron-skip-context-loading branch April 13, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cron jobs hang after agent produces output — never reaches delivery

1 participant