Skip to content

feat: add --auto-resume flag to uipath run#1240

Open
mjnovice wants to merge 3 commits intomainfrom
feat/poll-for-triggers
Open

feat: add --auto-resume flag to uipath run#1240
mjnovice wants to merge 3 commits intomainfrom
feat/poll-for-triggers

Conversation

@mjnovice
Copy link
Contributor

@mjnovice mjnovice commented Jan 30, 2026

Summary

  • Add --auto-resume CLI flag to uipath run that enables automatic resumption after HITL triggers instead of suspending
  • Create SilentDebugBridge for non-interactive auto-resume mode
  • Reuse existing UiPathDebugRuntime polling mechanism

Usage

# Auto-resume with default 10s polling interval
uipath run agent.py '{}' --auto-resume

# Auto-resume with custom 5s polling interval
uipath run agent.py '{}' --auto-resume=5

Behavior

  • API/HITL triggers: Prompts for JSON input via stdin
  • Other triggers (TASK, JOB, DEEP_RAG, QUEUE_ITEM, etc.): Polls backend until complete
  • Ctrl+C: Graceful termination during polling

Test plan

  • Test basic auto-resume: uipath run agent.py '{}' --auto-resume
  • Test custom interval: uipath run agent.py '{}' --auto-resume=5
  • Test Ctrl+C interruption during polling
  • Test API trigger prompts for input
  • Verify existing tests pass

🤖 Generated with Claude Code

Add a new CLI flag that enables polling for resume triggers instead of
suspending execution. This reuses the existing UiPathDebugRuntime polling
mechanism with a new SilentDebugBridge for non-interactive use.

Usage:
- `uipath run agent.py '{}' --poll-for-triggers` (5s default interval)
- `uipath run agent.py '{}' --poll-for-triggers=10` (custom 10s interval)

For API/HITL triggers, prompts for JSON input via stdin.
For other triggers (TASK, JOB, DEEP_RAG, etc.), polls until complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@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 30, 2026
@mjnovice mjnovice changed the title feat: add --poll-for-triggers flag to uipath run WIP feat: add --poll-for-triggers flag to uipath run Jan 30, 2026
- Rename CLI flag from --poll-for-triggers to --auto-resume
- Change default polling interval from 5s to 10s
- Update help text and internal variable names

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mjnovice mjnovice changed the title WIP feat: add --poll-for-triggers flag to uipath run feat: add --auto-resume flag to uipath run Feb 4, 2026
Move UiPathDebugRuntime wrapping to only occur in the auto-resume
code path (no job_id). This prevents potential double wrapping when
job_id is set and ensures consistent behavior with cli_debug.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mjnovice mjnovice requested a review from cristipufu February 4, 2026 03:45
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.

2 participants