fix: harden Discord sync and cron memory opt-in - #30965
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused regressions. The API filename and cron-tool access ideas still address behavior absent from current main, but the cron implementation needs rework; the Discord portion is already implemented.
Problems
- The added
skip_memory=Falsepath initializes the external provider, then current turn finalization automatically callssync_allandqueue_prefetch_all(run_agent.py:3416-3424). Suppressing system-prompt memory does not prevent automatic persistence, so this does not provide the stated deliberate-tools-only behavior. - Discord deletion-before-create is already on main in
plugins/platforms/discord/adapter.py:1897-1914, with the near-cap regression intests/gateway/test_discord_sync_limit.py:61-140(commite9b86f352fc73db5ca3de6e3fb50ef57d774f8f9).
Suggested changes
- Re-scope the cron work to a tools-only provider mode that blocks automatic prefetch/sync, and add an integration test using a provider that records lifecycle calls.
agent/memory_provider.py:74-76specifically identifies cron as a context providers should skip for writes. - Drop the superseded Discord hunk when salvaging.
This is an automated hermes-sweeper review.
| # autonomous/system prompts can corrupt user representations if | ||
| # ingested as ordinary context. Selected jobs can still opt into | ||
| # memory/Honcho tool initialization via allow_memory_tools=True; | ||
| # suppress_memory_prompt keeps injection off while preserving an |
There was a problem hiding this comment.
Setting skip_memory=False enables the full external-provider lifecycle, not only its tools. Current turn finalization unconditionally calls sync_all and queue_prefetch_all for an initialized manager (run_agent.py:3416-3424), so this path automatically persists cron turns despite the tools-only claim. Please separate provider-tool exposure from prefetch/sync lifecycle activation and cover that with an integration test.
Summary
Test Plan