A scheduled agent must remember what it learned between runs: the job metadata, the last run’s results, and what it already processed. If the state does not persist, the agent repeats work it already did, sends duplicate messages, or forgets the decisions it made. The check is to plant a marker fact in one run and look for it in the next.
Before you start
An agent with a state store, such as a database or a notes file, and a way to run it twice in a row.
Write a marker fact in the first run
In the first run, have the agent record a distinctive fact in its state: a made-up order number, a test date, or a note that only this run could write. The marker must be something you can search for later.
Note the time the run finished and confirm the state was written: a run that ends before the write loses the marker.
Stop the agent and run it again
Stop the agent completely, then start it and run the same job again. The second run should load the state from the store, not from memory.
Ask the agent what it remembers from the last run, or check whether it skips the work it already did.
Check the marker and the skipped work
Search the second run’s state for the marker fact. If it is there, persistence works. If it is missing, the state is not being saved or not being loaded.
Check for duplicates too: if the second run repeats the first run’s messages or actions, the state loaded but the agent did not use it.
Practice check: fictional Maple Corner daily agent, marker ORD-TEST-77
The table below is fictional practice material, worked out by hand from the stated runs. It is the expected result for the practice check, not a run of any agent.
| Check | First run | Second run | Verdict |
|---|---|---|---|
| Marker ORD-TEST-77 stored | Yes | Found | Pass |
| Last run date remembered | 2026-11-28 | 2026-11-28 | Pass |
| Already-sent messages | 3 sent | 0 resent | Pass |
| Already-seen items | 12 seen | 12 skipped | Pass |
All four checks pass: the marker is found, the date is remembered, no message is resent, and the 12 seen items are skipped. The state persists and the agent uses it.
Expected result. UNTESTED: the checks in the practice table are worked out by hand, not measured by running an agent. Plant a marker fact in your own first run, restart the agent, and check that the second run finds the marker and skips the finished work.
Limits
- State that is saved but never loaded is the same as no state: test the load, not just the save.
- A marker fact must be distinctive: a common word can appear by coincidence and prove nothing.
