fix(daytona): classify DaytonaNotFoundError as file_not_found - #666
Open
Paul (paul-atx) wants to merge 1 commit into
Open
fix(daytona): classify DaytonaNotFoundError as file_not_found#666Paul (paul-atx) wants to merge 1 commit into
Paul (paul-atx) wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 4715ed9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Paul (@paul-atx) is attempting to deploy a commit to the LangChain Team on Vercel. A member of the Team first needs to authorize it. |
deepagents-acp
deepagents
@langchain/sandbox-standard-tests
@langchain/daytona
@langchain/deno
@langchain/modal
@langchain/node-vfs
@langchain/quickjs
commit: |
DaytonaSandbox.#mapError relied on error-message substrings and checked
`msg.includes("directory")` before a file-not-found match, so a missing
path could be misclassified as `is_directory`. The Daytona SDK maps a 404
to a typed DaytonaNotFoundError, so check that directly (mirroring the modal
provider's SandboxFilesystemNotFoundError check), and align the message
fallback with modal ("no such file" -> file_not_found, and narrow the
directory check to "is a directory"). Callers that treat file_not_found as
expected (e.g. optional memory files in the deepagents fs middleware) then
degrade gracefully instead of throwing.
Paul (paul-atx)
force-pushed
the
fix/daytona-maperror-enoent
branch
from
July 12, 2026 17:53
3fb2ac5 to
4715ed9
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.
Summary
DaytonaSandbox.#mapErrorclassified filesystem errors purely from the error-message text, checkingmsg.includes("directory")before matching file-not-found. The Daytona SDK maps a 404 to a typedDaytonaNotFoundError, so a missing path could be misclassified asis_directorydepending on the message wording.Callers that treat
file_not_foundas expected — e.g. the optional memory files in the deepagents fs middleware, which skip onfile_not_foundbut throw on any other code — would then throwFailed to download <path>: is_directoryinstead of degrading gracefully.The
modalprovider already classifies missing paths by type (error instanceof SandboxFilesystemNotFoundError→file_not_found); this alignsdaytonawith it.Changes
error instanceof DaytonaNotFoundErrorfirst →file_not_found(robust to message wording, mirrors modal)."no such file", and narrow the directory check from"directory"to"is a directory".Test plan
@langchain/daytonaunit tests.