Skip to content

feat: instrument agent run startup for hang diagnosis#1825

Open
radu-mocanu wants to merge 1 commit into
mainfrom
feat/coded-agent-startup-logging
Open

feat: instrument agent run startup for hang diagnosis#1825
radu-mocanu wants to merge 1 commit into
mainfrom
feat/coded-agent-startup-logging

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • emit INFO [startup] progress logs around each runtime construction step in uipath run (factory resolve, entrypoint discovery, factory settings, governance resolve, runtime build / graph compile, execution start)
  • arm a startup traceback watchdog at CLI import: if startup blocks past a threshold, dump all thread stacks to stderr (into the job logs), then cancel once the runtime is ready so healthy runs never dump. opt-in via UIPATH_STARTUP_TRACEBACK_SECONDS, auto-enabled in the serverless runtime (120s default)

Why

serverless agent jobs can stall for the full ~15 min execution window before the agent ever starts, with zero log output in that window. the block sits before AgentRun.Start and even before the first application log, so there is no way to tell whether it is module import or runtime construction, or which frame is stuck. the step logs name the last stage reached, and the watchdog dumps the actual stack of the stalled process, both surfaced in the normal job logs without needing cluster access.

Development Packages

uipath

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath==2.13.14.dev1018257307",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath>=2.13.14.dev1018250000,<2.13.14.dev1018260000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }

Copilot AI review requested due to automatic review settings July 22, 2026 12:18
@radu-mocanu radu-mocanu added the build:dev Create a dev build from the pr label Jul 22, 2026
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations and removed build:dev Create a dev build from the pr labels Jul 22, 2026
@radu-mocanu
radu-mocanu force-pushed the feat/coded-agent-startup-logging branch from 20f2b15 to 2a8efd2 Compare July 22, 2026 12:19
@radu-mocanu radu-mocanu added the build:dev Create a dev build from the pr label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds explicit [startup] INFO log markers to the uipath run CLI path so serverless job logs show progress through runtime construction steps (factory resolve, entrypoint discovery, settings load, governance resolve, runtime build/graph compile, execution start), making pre-execution hangs diagnosable. Also bumps the uipath package version to 2.13.14.

Changes:

  • Emit [startup] INFO progress logs around major runtime construction steps in uipath run.
  • Bump uipath package version from 2.13.132.13.14 (and sync lockfile entry).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
packages/uipath/src/uipath/_cli/cli_run.py Adds [startup] INFO markers during runtime setup to pinpoint pre-execution stalls.
packages/uipath/pyproject.toml Bumps package version to 2.13.14.
packages/uipath/uv.lock Updates the lockfile’s uipath package entry to 2.13.14.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@radu-mocanu
radu-mocanu force-pushed the feat/coded-agent-startup-logging branch from 2a8efd2 to 2727b8c Compare July 22, 2026 13:12
@radu-mocanu radu-mocanu changed the title feat: log runtime construction steps during agent run feat: instrument agent run startup for hang diagnosis Jul 22, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants