-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Problem
update_task_status in agent_memory_server/tasks.py only sets error_message when the provided value is not None:
if error_message is not None:
task.error_message = error_messageThis means once an error_message is set on a task, it can never be cleared. If a task transitions from FAILED back to a new attempt (or if the error message needs to be reset), the stale error persists.
Impact
A task that previously failed and retains its error_message even after a successful resolution creates confusing state: status=SUCCESS + error_message="Connection refused".
Proposed Fix
Use a sentinel value pattern to distinguish "caller didn't pass error_message" from "caller wants to clear error_message". This allows error_message="" or a dedicated _UNSET sentinel to clear the field.
Related
Part of #190 (Summary Views and Tasks)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels