Skip to content

fix(advanced): close the code interpreter REPL at exit so the process can terminate - #1099

Merged
radu-mocanu merged 1 commit into
mainfrom
fix/code-interpreter-close-at-exit
Sep 18, 2026
Merged

radu-mocanu merged 1 commit into
mainfrom
fix/code-interpreter-close-at-exit

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • an advanced agent process with the code interpreter enabled now exits when its run is over, so the job is reported as suspended instead of staying in Running forever

Why

more details in the issue created for the upstream library: langchain-ai/deepagents#6397

… can terminate

langchain-quickjs 0.3.7 closes its QuickJS contexts from __del__ by blocking on
its daemon worker thread. At interpreter finalization that thread no longer
runs, so any process that built the middleware hangs on exit and the robot
never learns the job suspended or finished.

(cherry picked from commit 97fe15b)
Copilot AI lite review requested due to automatic review settings September 18, 2026 08:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

All reviewed changes address the shutdown hang and include regression coverage.

Pull request overview

Adds exit-time QuickJS REPL cleanup to prevent advanced code-interpreter processes from hanging during shutdown.

Changes:

  • Registers REPL cleanup with atexit.
  • Adds regression coverage.
  • Bumps the package version to 0.18.10.
File summaries
File Description
uv.lock Updates the locked package version.
tests/agent/advanced/test_code_interpreter.py Tests cleanup registration.
src/uipath_langchain/agent/advanced/code_interpreter.py Registers REPL cleanup at process exit.
pyproject.toml Updates the package version.
Review details
  • Files reviewed: 3/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.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

@radu-mocanu
radu-mocanu merged commit 456bc38 into main Sep 18, 2026
47 of 49 checks passed
@radu-mocanu
radu-mocanu deleted the fix/code-interpreter-close-at-exit branch September 18, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants