Description
Currently, when a heartbeat job triggers while an agent is already performing a task, it can lead to a 'No Response' error or cause the active task/heartbeat to fail.
Proposed Change
Instead of failing or causing a timeout/no-response, the heartbeat should be queued or delayed until the current active task is completed. This ensures that periodic maintenance or reporting tasks don't interrupt foreground work and are executed reliably once the agent is free.
Use Case
Long-running tasks like studying, large code generation, or system audits should not be disrupted by background heartbeats, and heartbeats should eventually run to maintain system consistency.
Description
Currently, when a heartbeat job triggers while an agent is already performing a task, it can lead to a 'No Response' error or cause the active task/heartbeat to fail.
Proposed Change
Instead of failing or causing a timeout/no-response, the heartbeat should be queued or delayed until the current active task is completed. This ensures that periodic maintenance or reporting tasks don't interrupt foreground work and are executed reliably once the agent is free.
Use Case
Long-running tasks like studying, large code generation, or system audits should not be disrupted by background heartbeats, and heartbeats should eventually run to maintain system consistency.