Skip to content

fix(deepagents): isSandboxBackend returns false for empty string id#332

Merged
Hunter Lovell (hntrl) merged 2 commits intomainfrom
sandbox-id-bug
Mar 20, 2026
Merged

fix(deepagents): isSandboxBackend returns false for empty string id#332
Hunter Lovell (hntrl) merged 2 commits intomainfrom
sandbox-id-bug

Conversation

@maahir30
Copy link
Copy Markdown
Contributor

  • CompositeBackend gained a get id() getter in fix: delegate CompositeBackend.id to default sandbox backend #286 that returns "" when the default backend is not a sandbox. Since typeof "" === "string" is true, isSandboxBackend() incorrectly passed, causing the execute tool to be shown to agents even when execution isn't supported.
  • Strengthened both isSandboxBackend and isSandboxProtocol to also reject empty string id values.
  • Added a regression test for this case.

Fixes #325

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 19, 2026

🦋 Changeset detected

Latest commit: cb6cffc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
deepagents Patch
deepagents-acp Patch
@deepagents/evals Patch

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/deepagents-acp@332
npm i https://pkg.pr.new/deepagents@332
npm i https://pkg.pr.new/@langchain/sandbox-standard-tests@332

commit: cb6cffc

@hntrl Hunter Lovell (hntrl) merged commit 3ff382e into main Mar 20, 2026
15 checks passed
@hntrl Hunter Lovell (hntrl) deleted the sandbox-id-bug branch March 20, 2026 18:39
@github-actions github-actions bot mentioned this pull request Mar 20, 2026
Colin Francis (colifran) pushed a commit that referenced this pull request Mar 24, 2026
…d` (#332)

* fix sandbox id bug

* Improve condition for checking sandbox backends

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
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.

Implementing the BackendProtocol without execute tool still shows the agent an execute tool

2 participants