Repository navigation
fix(agent): hold daytona below 2.0 and lock 0.232.0 - #103
Merged
contextablemark merged 2 commits intoNov 19, 2026
Merged
Conversation
Daytona 2.0.0 moved every type out of the package root into version namespaces. On it, `from daytona import CreateSandboxFromSnapshotParams` in coding/sandbox.py raises ImportError, and so does `import langchain_daytona` in every release up to 0.0.9. The agent declared `daytona>=0.204.0` with no ceiling, so any re-lock would pick up 2.0 and break the coder. Declare `daytona>=0.232.0,<1` and lock 0.232.0, the newest 0.x release. Add an offline contract test that reads the installed SDK classes for every call the coder makes, and a packaging test that fails if the ceiling is removed.
The comment named 2.0 as the breaking release but did not say why the bound stops at 1. A reader of pyproject.toml alone could widen it to <2 and admit the untested 1.0.1 release.
mme
approved these changes
Nov 19, 2026
mme
left a comment
There was a problem hiding this comment.
Looks good. Checked out the branch and ran it in agent/: uv lock --check passes and uv run pytest gives 860 passed, 1 skipped (the Composio test that needs root node_modules). The lock has daytona at 0.232.0 and langchain-daytona still at 0.0.7.
One non-blocking note: the contract test imports Git and Process from daytona._sync.*, which are private modules, so a 0.x release that reorganises internals could fail the test without breaking the agent. Fine as is, since the lock holds the version.
For context, daytona 2.0.0 is currently yanked on PyPI, so a re-lock would not pick it up today. The <1 ceiling is what keeps that true once it is un-yanked.
contextablemark
deleted the
contextablemark/albert-daytona-python-compat
branch
November 19, 2026 17:23
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.
What this fixes
Daytona released 2.0.0 on 2026-11-13. In 2.0 the
daytonapackage root exports only the clients. Every type moved into version namespaces (daytona.v0,daytona.v2).On 2.0, two imports the coder needs fail:
from daytona import CreateSandboxFromSnapshotParamsinagent/coding/sandbox.pyraisesImportError.import langchain_daytonaraisesImportErrorin every release up to the latest, 0.0.9.The agent declared
daytona>=0.204.0with no upper limit. Production builds from the frozen lock (0.204.0), so it works today. But any re-lock, a dependency bump, or a fresh install by someone who clones OpenTag picks up 2.0 and breaks the coder.Moving our imports to
daytona.v0is not enough, becauselangchain-daytonawould still fail. So this PR holdsdaytonaon 0.x.Changes
agent/pyproject.toml:daytona>=0.204.0→daytona>=0.232.0,<1, with a comment that says why.1.0.1is an old, unrelated release, so the limit is<1.agent/uv.lock: daytona and its sixdaytona-*client packages go from 0.204.0 to 0.232.0, the newest 0.x release. The re-lock also moves pydantic, pydantic-core, urllib3, aiohttp, yarl and typing-inspection forward, because 0.232.0 needs newer versions.agent/tests/test_daytona_sdk_contract.py: like the Composio and Arcade contract tests, it reads the real installed SDK classes offline. It checks the snapshot params,Daytona.create,Process.execand its result fields, the five Git methods and their arguments,Sandbox.delete, and howDaytonaSandboxtakes the sandbox.agent/tests/test_packaging.py: a new test fails ifdaytonaloses its upper limit.Verification
uv run pytest(inagent/): 861 passed. Without rootnode_modules, one Composio test is skipped (860 passed, 1 skipped).uv lock --checkpasses.ImportError.pnpm check-types,pnpm test(499/499) andnode node_modules/railway/dist/iac/bin.jspass. This PR does not change any JS.agent/scripts/probe_daytona.pyon 0.232.0 passed every step. That covers the raw SDK path (create,process.exec, session execute, the tool probe, delete) and the productionPerJobDaytonaBackendpath (create, three commands on one box,stop_current). Both sandboxes were deleted, and the account had no sandboxes left afterwards.Not in this PR
langchain-daytonato 0.0.9. That release requiresdeepagents>=0.7, but OpenTag locks 0.6.12. That is a separate upgrade.langchain-daytonato support 2.0 first.