feat(cron): write execution summary to agent memory after job completion - #4696
Closed
kagura-agent wants to merge 0 commit into
Closed
feat(cron): write execution summary to agent memory after job completion#4696kagura-agent wants to merge 0 commit into
kagura-agent wants to merge 0 commit into
Conversation
Contributor
Author
CI NoteThe 5 test failures are pre-existing and unrelated to this PR:
Verification: The same |
Open
1 task
Contributor
Author
|
Gentle ping — any feedback on this? Happy to adjust the approach. 🙏 |
kagura-agent
force-pushed
the
feat/cron-memory-writeback
branch
from
April 13, 2026 11:24
b6e7cc9 to
3e99964
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When cron jobs run, they execute in isolation. The main conversational agent has no knowledge of what cron jobs did. Users ask "did you send me a briefing?" and the agent says "no" even though it did.
Solution
After a cron job completes successfully, write a lightweight record to the agent's MEMORY.md via the existing
MemoryStoremechanism.Entry format
[Cron]prefix helps the agent distinguish cron records from its own notes§delimited entry format (handled byMemoryStore.add())Opt-out configuration
Two levels of opt-out, both defaulting to enabled:
memory_writeback: falsein the job definitioncron.memory_writeback: falseinconfig.yamlSafety
MemoryStore.add()returns an error), it's silently ignoredChanges
cron/scheduler.py_write_memory_summary()function; called intick()aftersave_job_outputcron/jobs.pymemory_writebackparameter tocreate_job()tests/cron/test_scheduler.pytests/cron/test_jobs.pymemory_writebackfield persistenceTests
All 99 cron tests pass:
Closes #2704