Repository navigation
Conversation
…sole link when output settles
Removing the pre-launch SDK probe left every import failure with one hint: sync or install dependencies. An SDK older than 1.6.0 has no livekit.agents.__main__, so its users were told to sync a project that was already synced. Diagnose after the process exits on an import failure instead: probe the installed SDK then, and say it is missing (run `uv sync`), too old (upgrade to 1.6.0), or fall back to the generic hint. A healthy startup still launches one interpreter, and an ImportError a job catches no longer warns.
theomonnom
force-pushed
the
fix/python-agent-dev-startup
branch
from
November 12, 2026 23:38
c1b5dc8 to
a54548d
Compare
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.
Stacked on #1094.
#1094 removes the Python SDK probe that ran before launch. After that, every import failure gets the same hint: "sync or install the project's dependencies". That's wrong for an SDK older than 1.6.0. It has no
livekit.agents.__main__, so a fully synced project fails withNo module named livekit.agents.__main__and is told to sync.This PR keeps #1094's startup path, a single interpreter launch, and only checks the SDK after the process has exited with an import failure:
livekit-agentsnot installed (uv): "runuv syncand try again"livekit-agentsnot installed (other managers): "install the project's dependencies"It also stops the hint firing on an
ImportErrorthe agent catches at runtime (in a job, for example), since it now needs a failed exit.Tests:
TestStartPythonAgentReportsSDKOlderThanThinCLIsets up a 1.5.0 SDK with no__main__. It fails on #1094's head with the "sync or install" hint and passes here. The not-installed case inTestStartPythonAgentImportsOnceAndReportsMissingDependenciesnow expects "runuv sync".Timing,
lk agent dev→registered workeragainst a locallivekit-server --dev, livekit-agents 1.8.10, median of 10 runs. The PTY harness answers OSC 11/DA1 like a real terminal: