Repository navigation
feat(advanced): keep coded agents' workspace files across suspend and resume [PC-5359] - #1194
Draft
tudormatei1 wants to merge 2 commits into
Draft
tudormatei1 wants to merge 2 commits into
tudormatei1 wants to merge 2 commits into
Conversation
… resume Files a coded LangGraph or deepagents agent writes are lost when its job suspends and resumes on another machine. The factory now opts in to the host-managed workspace, so the uipath CLI persists the run's workspace folder as job attachments. UiPathWorkspaceBackend is a deepagents FilesystemBackend that looks up the current run's folder on every file operation. Coded graphs are built once at import time, before any run, so a root fixed at build time would point at the wrong folder. Outside a managed run it uses one temporary folder and logs a warning, and never the project folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Shows UiPathWorkspaceBackend in a job: the agent writes a report, suspends for a human review, and edits the same file after it resumes. Its review tool opens the draft from disk with plain Python, which is the reason to keep files on disk instead of in DeepAgents' default StateBackend. The tool tolerates a missing draft, because LangGraph re-runs an interrupted tool from the top on resume, and a local run without a job starts the resume in a new, empty folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Coded LangGraph and deepagents agents now keep the files they write across suspend and resume. The factory opts in to the CLI-managed workspace from UiPath/uipath-python#1976, and
UiPathWorkspaceBackendgives deepagents a file backend rooted in that workspace.Changes
UiPathWorkspaceBackend(agent/advanced/workspace_backend.py) is a deepagentsFilesystemBackendthat looks up its root withget_workspace_path()on every file operation. Coded graphs are built once at import, before any run, so a root fixed when the graph is built would never be the run's folder. Outside a managed run (local runs,uipath dev, older CLIs) it uses one temp folder and logs a warning naming it. It never falls back to the project folder, so an agent can't edit the project's files.get_settings()returnsmanaged_workspace=True. Older CLIs ignore the flag.docs/human_in_the_loop.md, for the backend and for plain tools that callget_workspace_path().samples/deepagent-workspace-files, a deepagents agent that writes/report.md, suspends oninterrupt()for a review, and edits the same file after resume. Its review tool reads the draft from disk with plain Python, which is the case for real files over DeepAgents' defaultStateBackend.Note
This works with the released uipath-runtime. The docs describe CLI behavior from UiPath/uipath-python#1976, so release that first or together. uipath-agents overrides
get_settingswith the flag off, so low-code agents aren't wrapped twice.Testing
UiPathWorkspaceBackend, suspends oninterrupt(), anduipath run --resumein a new process reads the file back from job attachments./report.mdand suspended inrequest_review.uipath run --resumein a new process ranedit_fileon the restored file, and the final report included the feedback. Without a job key, the resume finds no draft, as its README says.🤖 Generated with Claude Code