Executors not stored to database when they terminate
Author: fengtalityCreated Feb 21, 2026Updated Aug 31, 2026
Description
When an executor terminates (e.g., RunnableStatus.TERMINATED with CloseType.EARLY_STOP), it is not automatically stored to the database. Executors are only persisted when the bot shuts down gracefully via the stop command.
Current Behavior
StoreExecutorActionexists inhummingbot/strategy_v2/models/executor_actions.pybut is never emitted by any controllerstore_executor()method exists inExecutorOrchestratorbut is never called during normal operation- Executors are only saved via
store_all_executors()which is called on bot shutdown
Expected Behavior
When an executor terminates (status changes to TERMINATED), it should automatically be stored to the database so that:
- Users can analyze completed executors without stopping the bot
- Data is not lost if the bot crashes or is force-killed
- Export/analysis scripts can access completed executor data in real-time
Steps to Reproduce
- Start an LP Rebalancer controller
- Wait for an executor to complete (e.g., rebalance or early stop)
- Check the Executors table in SQLite - it will be empty
- The executor shows as TERMINATED in the Hummingbot CLI but is not in the database
Proposed Solution
Controllers should emit StoreExecutorAction when an executor terminates. This could be done in:
- Controller level: Each controller emits
StoreExecutorActionwhen it detects an executor has terminated - Orchestrator level:
ExecutorOrchestratorautomatically stores executors when their status changes toTERMINATED
Option 2 is cleaner as it handles all executor types centrally.
Affected Components
hummingbot/strategy_v2/executors/executor_orchestrator.pyhummingbot/strategy_v2/controllers/controller_base.py- All controllers that manage executors
Workaround
Run stop command in Hummingbot CLI to flush all executors to the database before analyzing.
Source: hummingbot/hummingbot