fix(advanced): warm the code interpreter before its first eval deadline - #1101
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The implementation and optional-extra behavior are covered by focused tests, with no blocking issues identified.
Pull request overview
Warms QuickJS WebAssembly modules before code-interpreter evaluations to avoid first-call deadline failures.
Changes:
- Adds cached interpreter warm-up during middleware construction.
- Adds an import-time preload module.
- Adds tests for warm-up, optional dependency handling, and preload behavior.
File summaries
| File | Description |
|---|---|
src/uipath_langchain/agent/advanced/code_interpreter.py |
Implements cached WebAssembly warm-up. |
src/uipath_langchain/agent/advanced/code_interpreter_preload.py |
Runs warm-up during module import. |
src/uipath_langchain/agent/advanced/__init__.py |
Exports the warm-up function. |
tests/agent/advanced/test_code_interpreter.py |
Tests warm-up and preload behavior. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
quickjs_rs compiles its source transform WebAssembly module lazily, inside the first eval of the process, under the same per-call deadline as user code. On a CPU-starved instance the compile alone outlasts the deadline, so the first advanced run on a fresh process fails at its first model call with "interrupted" and a retry on the same process succeeds. Compile it when the graph is built instead, and expose the warm-up so a host that preloads modules at process start can run it earlier. Claude-Session: https://claude.ai/code/session_013CLJG6q56YoHrgNTgm3pA3
radu-mocanu
force-pushed
the
fix/code-interpreter-warmup
branch
from
September 20, 2026 14:41
75e1200 to
8fd0a1c
Compare
|
dianagrecu-uipath
approved these changes
Sep 21, 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.



Summary
warm_code_interpreter()so a host that preloads modules at process start can run the compile earlierWhy
quickjs_rs compiles its source transform module lazily inside the first eval, under the same 5 s deadline as user code. On a CPU-starved instance the compile alone exceeds the deadline, so the first advanced run on a fresh process fails at its first model call with
interrupted, and a retry on the same process succeeds.