Bindu icon indicating copy to clipboard operation
Bindu copied to clipboard

[Feature]: Task Pause/Resume

Open soumojit-D48 opened this issue 8 months ago • 3 comments

Feature: Task Pause/Resume

What

Add ability to pause and resume running tasks in Bindu.

Why

Long-running AI agent tasks need a way to:

  • Temporarily stop execution to free resources
  • Resume from where it left off

How

Pause:

  • Save task state/metadata/context as checkpoint
  • Update task to "suspended" state

Resume:

  • Load checkpoint from storage
  • Restore context
  • Update task to "resumed" state

Rules:

  • Can only pause tasks in "working" state
  • Can only resume tasks in "suspended" state
  • Cannot pause/resume completed, canceled, or failed tasks

Files

  • bindu/server/workers/base.py - Implement pause/resume handlers
  • bindu/server/scheduler/base.py - Abstract methods (already exist)

soumojit-D48 avatar Mar 13 '26 19:03 soumojit-D48

looks like we can implement the pause/resume feature by adding a new state machine to the task lifecycle, with abstract methods in bindu/server/scheduler/base.py and concrete implementations in bindu/server/workers/base.py. we can use a checkpointing library like tensorflow's tf.train.Checkpoint to save and load task state. should i open a PR for this?

eskayML avatar Mar 16 '26 07:03 eskayML

Do you guys work on the feature if yes what's the status?

anikmalitha avatar Mar 28 '26 03:03 anikmalitha

Oops, let me use the weekend to raise the PR

eskayML avatar Mar 28 '26 07:03 eskayML