agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

Critical Bug: Task Corruption When Modifying Scheduled Tasks

Open Omni-NexusAI opened this issue 4 months ago • 4 comments

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

  1. Create a scheduled task (e.g., daily execution)
  2. Attempt to modify the task (add new functionality, change parameters)
  3. Observe that instead of updating the existing task, the system may create duplicates or corrupt the task
  4. 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.

Omni-NexusAI avatar Aug 13 '25 11:08 Omni-NexusAI

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

Cdddo avatar Aug 25 '25 02:08 Cdddo

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...)

Image

Cdddo avatar Aug 26 '25 19:08 Cdddo

I also recorded this showing how the UI becomes unresponsive when switching to the Tasks tab,

Image

Cdddo avatar Aug 26 '25 19:08 Cdddo

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.

Cdddo avatar Aug 27 '25 05:08 Cdddo