Skip to content

fix(cron): gate skip_memory on memory_search in enabled_toolsets - #33444

Closed
fayenix wants to merge 3 commits into
NousResearch:mainfrom
chiefmojo:pr/skip-memory-cron-fix
Closed

fix(cron): gate skip_memory on memory_search in enabled_toolsets#33444
fayenix wants to merge 3 commits into
NousResearch:mainfrom
chiefmojo:pr/skip-memory-cron-fix

Conversation

@fayenix

@fayenix fayenix commented May 27, 2026

Copy link
Copy Markdown
Contributor

Problem

Cron jobs with skip_memory=True silently block memory_search from all cron job sessions. This prevents cron-based workflows from accessing MemOS traces — even when the cron job explicitly includes "memory_search" in its enabled_toolsets.

Root Cause

In cron/scheduler.py, skip_memory=True is hardcoded for all cron jobs. The comment says "Cron system prompts would corrupt user representations" but this blanket approach breaks any cron job that needs memory access.

Fix

Gate skip_memory on whether "memory_search" is in the job's explicit enabled_toolsets:

# Before:
skip_memory=True,  # all cron jobs, always

# After:
skip_memory="memory_search" not in (_cron_toolsets or []),

The sentinel "memory_search" (rather than "memory") is intentional — "memory_search" never appears in default platform toolsets, so all default cron jobs keep skip_memory=True. Only jobs that explicitly opt in via enabled_toolsets: ["memory_search"] get skip_memory=False.

Testing

  • Verified across multiple Hermes instances running MemOS
  • Cron jobs with memory_search in toolsets now surface MemOS traces
  • Default cron jobs unaffected

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management tool/memory Memory tool and memory providers comp/plugins Plugin system and bundled plugins labels May 27, 2026
Cron jobs with `skip_memory=True` silently block `memory_search` from all
cron job sessions, preventing reflection cards, heartbeat nudges, and any
other cron-based workflow from accessing MemOS traces.

Fix: only skip memory when `"memory_search"` is NOT in the cron job's
explicit `enabled_toolsets`. Default cron jobs keep `skip_memory=True`;
jobs that explicitly opt in via `enabled_toolsets: ["memory_search"]`
get `skip_memory=False`.

Co-authored-by: Violet <violetfrequency@proton.me>
@fayenix
fayenix force-pushed the pr/skip-memory-cron-fix branch from 6ef18d7 to 087eba8 Compare June 21, 2026 22:52

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for targeting a verified cron memory-provider gap.

Problems

  • cron/scheduler.py:2045 in this diff checks memory_search, but cron's enabled_toolsets field contains toolset names (cron/jobs.py:1078). The provider gate accepts memory or a composite resolving to it (agent/memory_manager.py:82-116), and unknown toolsets resolve to no schemas (model_tools.py:367-388). Consequently, ["memory"] still leaves skip_memory=True, while ["memory_search"] is not a standard usable opt-in.
  • This change also enables the full provider lifecycle rather than only search: completed turns call MemoryManager.sync_all() (run_agent.py:3403-3424). The current cron default explicitly protects user representations (cron/scheduler.py:3073), so the desired write/sync policy needs to be explicit.

Suggested changes

  • Base the opt-in on the established memory toolset and preserve the default-off behavior. Choose and document whether job-level selection, cron-platform configuration, or a separate persisted opt-in is required.
  • Add scheduler tests for default behavior and the supported explicit opt-in path.

Automated hermes-sweeper review.

Comment thread cron/scheduler.py
@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 13, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing as superseded by PR #91447 (merged as ef04d84) — the toolset-gated approach is no longer needed since cron now passes skip_memory=False unconditionally and the memory toolset denial was removed entirely. Thanks @fayenix.

@teknium1 teknium1 closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants