Files
crewAI/lib/crewai/tests
Devin AI a24b011f6f fix: auto-restore persisted state for class-level @persist decorator
When @persist is applied at the class level, new flow instances now
automatically load the most recent persisted state for that flow class.
This matches the documented behavior where creating a new instance of a
@persist-decorated flow seamlessly continues from the previous run's state.

Changes:
- Add load_latest_by_class() to FlowPersistence base class
- Implement load_latest_by_class() in SQLiteFlowPersistence with
  flow_class column and index for efficient lookups
- Store flow class name when persisting state via PersistenceDecorator
- Auto-restore latest state in class-level @persist decorator's __init__
- Add migration for existing databases (ALTER TABLE ADD COLUMN)

Fixes #5378

Co-Authored-By: João <joao@crewai.com>
2026-04-09 06:32:49 +00:00
..
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2025-10-20 14:10:19 -07:00
2026-03-24 19:03:35 +08:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-10-20 14:10:19 -07:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00