Skip to content

feat: Implement breakpoint resume functionality for failed tasks#3756

Open
Zephyroam wants to merge 15 commits into
camel-ai:masterfrom
Zephyroam:Allow-Worker-to-Resume-Failed-Tasks-from-Breakpoints
Open

feat: Implement breakpoint resume functionality for failed tasks#3756
Zephyroam wants to merge 15 commits into
camel-ai:masterfrom
Zephyroam:Allow-Worker-to-Resume-Failed-Tasks-from-Breakpoints

Conversation

@Zephyroam

Copy link
Copy Markdown
Collaborator

Description

Fixes #3739

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed:
  • I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

@coderabbitai

coderabbitai Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Zephyroam Zephyroam added the Review Required PR need to be reviewed label Jan 27, 2026
@fengju0213 fengju0213 added this to the Sprint 48 milestone Feb 1, 2026

@nitpicker55555 nitpicker55555 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You designed an entire serialize → store → deserialize pipeline to maintain the agent’s context, but I think this workflow is overly complex and introduces a number of issues, for example, _save_breakpoint_history is invoked repeatedly, and exceptions can cause agent leakage.

Why don’t we simply avoid releasing the agent when a task fails and reuse the existing instance directly instead?

@Zephyroam

Copy link
Copy Markdown
Collaborator Author

You designed an entire serialize → store → deserialize pipeline to maintain the agent’s context, but I think this workflow is overly complex and introduces a number of issues, for example, _save_breakpoint_history is invoked repeatedly, and exceptions can cause agent leakage.

Why don’t we simply avoid releasing the agent when a task fails and reuse the existing instance directly instead?

Done. Thanks @nitpicker55555

Comment thread camel/societies/workforce/single_agent_worker.py
Comment thread examples/workforce/breakpoint_resume_example.py Outdated
Comment thread camel/societies/workforce/single_agent_worker.py Outdated
Comment thread camel/societies/workforce/single_agent_worker.py
Comment thread examples/workforce/breakpoint_resume_example.py Outdated
@Zephyroam Zephyroam force-pushed the Allow-Worker-to-Resume-Failed-Tasks-from-Breakpoints branch from 8f6afdf to 76828b9 Compare February 13, 2026 15:39
Comment thread camel/societies/workforce/single_agent_worker.py
@Zephyroam

Copy link
Copy Markdown
Collaborator Author

@nitpicker55555 Done. Also fixed other possible memory leaks.

@nitpicker55555 nitpicker55555 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Zephyroam for this contribution, LGTM! @Wendong-Fan can you take time to check?

@waleedalzarooni waleedalzarooni self-requested a review February 16, 2026 05:23

@waleedalzarooni waleedalzarooni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @Zephyroam, A quick comment on my side, would be great to see some unit tests.

Comment thread camel/societies/workforce/workforce.py
@Zephyroam

Copy link
Copy Markdown
Collaborator Author

Done, thanks @waleedalzarooni

@Zephyroam

Copy link
Copy Markdown
Collaborator Author

Please review this @Wendong-Fan Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review Required PR need to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow Worker to Resume Failed Tasks from Breakpoints

4 participants