Skip to content

Conversation

@Chibionos
Copy link
Contributor

Summary

Enables evaluators to execute and produce scores after agent resumes from suspended state.

Changes

  1. Consistent thread_id for suspend/resume

    • Changed from execution_id (new UUID each run) to eval_item.id (consistent identifier)
    • Ensures checkpoints can be found when resuming
  2. Command API integration

    • Pass Command(resume=data) when --resume flag is set
    • Provides resume data to waiting interrupt() call
  3. Enhanced logging

    • Added logging to track resume mode execution
    • Shows which eval_item.id is used for checkpoint loading

Testing

Tested with suspend/resume evaluation samples in uipath-langchain-python:

  • ✅ Suspend phase creates checkpoints with eval_item.id as thread_id
  • ✅ Resume mode detected and logged
  • ✅ Checkpoint successfully loaded using consistent thread_id
  • 🚧 Resume execution encounters Pydantic validation - needs investigation

Built on top of

🤖 Generated with Claude Code

@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 15, 2026
@Chibionos Chibionos force-pushed the feat/enable-evaluators-on-resume branch from c00a487 to 540ed7a Compare January 16, 2026 01:19
- Use eval_item.id as runtime_id to maintain consistent thread_id across suspend/resume
- Pass UiPathExecuteOptions(resume=True) when in resume mode
- Add logging to track resume mode execution

This ensures:
1. Checkpoints can be found when resuming (same thread_id)
2. Framework-agnostic approach (uses runtime options, not LangGraph Command)
3. Resume handling is delegated to runtime layer where framework-specific logic belongs
@Chibionos Chibionos force-pushed the feat/enable-evaluators-on-resume branch from 540ed7a to e905c9c Compare January 16, 2026 01:23
# Create a new runtime with runtime_id for this eval execution.
# Use eval_item.id to maintain consistent thread_id across suspend and resume.
# This ensures checkpoints can be found when resuming from suspended state.
runtime_id = eval_item.id
Copy link
Member

Choose a reason for hiding this comment

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

I think someone changed this for a reason I can't remember. @akshaylive or @radu-mocanu do you guys remember why we no longer use eval_item.id as the runtime_id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They made it so there was no conflict in the runtime when multiple evals were started the runtime collided

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to fix the LangGraph aspect too. Is there a better way @cristipufu it is not resume properly for me without this change as the mapping won't work

Copy link
Contributor

Choose a reason for hiding this comment

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

as far as I remember the concern was regarding running multiple eval runtimes in parallel targeting the same evaluation set. there would be collisions since eval_item.id is static

During resume, the eval runtime should pass None as input instead of
inputs_with_overrides. This allows the UiPathResumableRuntime wrapper to:
1. Fetch triggers from storage
2. Read resume data via trigger_manager.read_trigger()
3. Build resume map: {interrupt_id: resume_data}
4. Pass this map to the delegate runtime

The wrapper's _restore_resume_input() method handles the resume data
restoration automatically when input is None. Passing the original input
would skip this mechanism and cause the resume to fail.

This completes the fix for evaluator execution after resume, working in
conjunction with the langchain runtime's Command(resume=...) wrapper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants