revert: process tool folder resolution fallback (#1038) - #1047
Merged
Conversation
This reverts the folder resolution change from #1038 (a1bd280). The new precedence — env path, then the resource's design-time folderPath, then the folder key — makes the packaged folderPath shadow the live execution context. Lowcode agents exported from Agent Builder/Solutions always carry the literal "solution_folder" placeholder in agent.json, so on serverless (where UIPATH_FOLDER_PATH is unset) StartJobs was called with folderPath="solution_folder" and Orchestrator rejected it, surfacing as "Could not find folder for tool '<tool>'". The UIPATH_FOLDER_KEY fallback the change was added for never fired. Restoring the previous behaviour passes folder_path=None so the SDK resolves the tool in the job's own execution folder. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR reverts the process-tool folder resolution fallback introduced in #1038, restoring the prior serverless behavior where process tools resolve within the execution context rather than using design-time folderPath. It also bumps the package version from 0.16.6 to 0.16.7 to ship the revert.
Changes:
- Revert
create_process_toolfolder resolution to only useUIPATH_FOLDER_PATH, removingUIPATH_FOLDER_KEY/resource-folder fallbacks and related span metadata. - Remove the folder-resolution test suite added in #1038 and update remaining assertions to match the reverted
invoke_asynccall signature. - Bump version to
0.16.7and refreshuv.lockaccordingly.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/uipath_langchain/agent/tools/process_tool.py |
Reverts folder resolution logic to only use get_execution_folder_path() and removes folder_key usage/metadata. |
src/uipath_langchain/_utils/_environment.py |
Removes get_execution_folder_key() helper, leaving only folder path env lookup. |
src/uipath_langchain/_utils/__init__.py |
Stops exporting get_execution_folder_key from _utils. |
tests/agent/tools/test_process_tool.py |
Deletes folder fallback tests and updates call assertions to omit folder_key=None. |
pyproject.toml |
Version bump 0.16.6 → 0.16.7. |
uv.lock |
Lockfile updated for the version bump and refreshed resolution metadata/markers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
radu-mocanu
approved these changes
Aug 25, 2026
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.



Reverts the folder resolution change from #1038 (a1bd280). Version bumped 0.16.6 → 0.16.7.
Why
#1038 broke tool resolution for lowcode agents on serverless. The alpha CI agent (
SimpleAgenton thePythonAwsTests/PythonK8sTeststenants) fails on every run with:Serverless.RuntimeVersionspins it to the package version, not to anything on the agent side — the agent itself hasn't changed:Fails iff
uipath-langchain >= 0.16.5— the version #1038 shipped in.Root cause
The change introduced this precedence in
create_process_tool:On a serverless job
UIPATH_FOLDER_PATHis unset, so it falls through toresource.properties.folder_path. For anything exported from Agent Builder / Solutions that value is the literal"solution_folder"placeholder baked intoagent.jsonat export time. It's truthy, so:folder_keyis forced toNoneand theUIPATH_FOLDER_KEYfallback the PR was written for never fires — it's dead code for every packaged agentfolderPath="solution_folder", Orchestrator rejects it (code 1100), and it surfaces as the "Could not find folder" message aboveBefore the change,
folder_path=Nonewas passed and the SDK resolved the process in the job's own execution folder — the correct behaviour for these agents. Lowcode agents never carry a usablefolderPath; the real value arrives via binding overwrites at runtime.The eval-serverless failure #1038 was chasing is a missing binding overwrite /
fpsPropertiesadvertisement on the eval path, not something to compensate for in the runtime.Follow-up (agreed in this thread, separate PRs)
resource.properties.folder_pathliterally, so coded agents can pass a folder explicitlyNone, since lowcode agents always carry thesolution_folderplaceholder and rely on binding overwrites for the real valuesolution_foldersentinel — a band-aid on top of this regression; superseded by the aboveReverting now to unblock the pipeline; the proper fix lands on its own timeline.
Testing
ruff check/ruff formatclean, httpx client linter cleanTestProcessToolFolderResolution(added by fix: process tool folder fallback when UIPATH_FOLDER_PATH is unset #1038) removed along with the code it covered🤖 Generated with Claude Code