Repository navigation
feat(cli): keep coded agents' workspace files across suspend and resume [PC-5359] - #1976
Draft
tudormatei1 wants to merge 2 commits into
Draft
tudormatei1 wants to merge 2 commits into
tudormatei1 wants to merge 2 commits into
Conversation
Coded agents lose the files they write when a job suspends, because nothing wraps them in HydrationRuntime. A factory can now opt in with UiPathRuntimeFactorySettings.managed_workspace, and run, debug and each eval item then get a workspace folder that is uploaded as job attachments on suspend and restored on resume. Only job runs are wrapped: only jobs resume in a new process, and outside a job there are no credentials to build the attachments client. A conversational run also uploads after a successful exchange, because the next exchange resumes the same job. Hydration sits outside governance, whose dispose does not reach the inner runtime, so the temporary folder is still removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The resume round trip, the conversation policy and folder removal are already checked by the run/debug command tests or by uipath-runtime's ManagedWorkspace tests. The settings-read count only pinned an optimization. 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 agents now keep the files they write to disk when their job suspends and resumes. A runtime factory opts in with
UiPathRuntimeFactorySettings.managed_workspace.uipath run,uipath debugand each eval item then run in a workspace folder that is uploaded as job attachments on suspend and restored on resume. uipath-langchain opts in with UiPath/uipath-langchain-python#1194.Warning
Needs uipath-runtime 0.13.7 (UiPath/uipath-runtime-python#175). CI fails on the
ManagedWorkspaceimport until it's released. Before merge, raise the pin touipath-runtime>=0.13.7, <0.14.0and relock.Changes
wrap_with_managed_workspace(_utils/_managed_workspace.py) wraps only when the factory opts in, the run is a job (UIPATH_JOB_KEY), and the factory has storage. Only jobs resume in a new process, and outside a job there may be no credentials for the attachments client. Local--resumeruns therefore don't get their files back.cli_run.py,cli_debug.pyandeval/runtime/runtime.pymake one call each: outside governance, inside the chat and debug wrappers. Governance'sdisposedoesn't reach the runtime it wraps, so wrapping inside it would leave the temp folder behind.__aenter__instead of once per item.Testing
runanddebugcommands and the eval runtime, with fakes only for the attachments and jobs APIs and the storage. They cover: files come back after resume, uploads link to the job, the folder key reaches every attachments call, nothing is wrapped outside a job or without the opt-in, conversational exchanges keep files, and each eval item gets its own workspace.uipath run --resumein a new process reads it back from job attachments. WithoutUIPATH_JOB_KEY, nothing comes back.ManagedWorkspaceuntil runtime 0.13.7 ships. The tests ran in a venv with the local runtime.🤖 Generated with Claude Code