Critical Bug: Task Corruption When Modifying Scheduled Tasks
Description
When modifying existing scheduled tasks, the system sometimes creates corrupted tasks or duplicates instead of properly editing the original task. This results in tasks that either don't function at all or run into errors when executed.
Expected Behavior
When a user modifies an existing scheduled task (e.g., one that runs daily or every other day), the system should update the existing task configuration without creating duplicates or corrupting the task.
Actual Behavior
- When attempting to modify scheduled tasks, the system sometimes deletes the original task and creates a new one without preserving original parameters when required.
- In other cases, it creates a duplicate task instead of editing the existing one
- The modified task often becomes corrupted and fails when executed
- Corrupted tasks appear to be running but encounter errors during execution
- This is particularly problematic for regularly scheduled tasks
Impact
This bug prevents reliable task automation and undermines user trust in the scheduling system. Users cannot confidently modify existing tasks without risking workflow disruption.
Steps to Reproduce
- Create a scheduled task (e.g., daily execution)
- Attempt to modify the task (add new functionality, change parameters)
- Observe that instead of updating the existing task, the system may create duplicates or corrupt the task
- Execute the modified task and observe errors
Environment
- Agent Zero version: Unknown (reported in current version)
- Task types affected: Scheduled tasks with regular intervals
Additional Context
This appears to be a critical issue in the task management subsystem that handles modifications to existing scheduled tasks. The system should ensure atomic updates to task configurations without side effects like duplication or corruption.
I think this is related:
For some reason it seems I can't delete tasks. I open the tasks UI in settings and click the button to delete tasks and nothing happens, or the window just hangs (requiring a container restart). The window also constantly refreshes like every second making it impossible to scroll.
The tasks might have become corrupted when modified causing problems with deleting them, and perhaps the whole UI when it tries to read them.
Sometimes switching from the chat to the tasks tab also causes A0 to hang. The log shows
python-dotenv could not parse statement starting at line 41
python-dotenv could not parse statement starting at line 42
python-dotenv could not parse statement starting at line 43
python-dotenv could not parse statement starting at line 44
python-dotenv could not parse statement starting at line 45
python-dotenv could not parse statement starting at line 46
I recorded this, showing how the UI "jumps" and how these tasks can't be deleted. They can't be deleted regardless of state (idle, error, running...)
I also recorded this showing how the UI becomes unresponsive when switching to the Tasks tab,
I managed to figure out why I couldn't delete the tasks, I was using A0 as a PWA with Vivaldi and for some reason the confirmation popup when you click delete does not show up in the PWA window, but does if I open it in a regular browser window.
Deleting a bunch of the corrupted tasks led to the sidebar tab not longer causing a hang. But the UI "jump" every second still persists.