Skip to content

fix(deepagents): correct supporting file and script guidance - #1085

Draft
Mason Daugherty (mdrxy) wants to merge 2 commits into
mainfrom
robin/skills-prompt-sources
Draft

Mason Daugherty (mdrxy) wants to merge 2 commits into
mainfrom
robin/skills-prompt-sources

Conversation

@mdrxy

Copy link
Copy Markdown
Member

JS port of the matching deepagents fix. The skills prompt now resolves supporting-file paths relative to the skill's directory, and only suggests executing scripts when the backend can execute (including backend factories). Otherwise it says scripts can be read.

References

Made by Robin · view thread · anthropic:claude-opus-5-5 (high)

Resolve supporting paths relative to skills and only suggest execution for sandbox backends.

Co-authored-by: Robin <open-swe@users.noreply.github.com>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
deepagentsjs-ui Ready Ready Preview Nov 18, 2026 11:16pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 339474c

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

This PR includes changesets to release 2 packages
Name Type
deepagents Patch
deepagents-acp 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

@robin-agent robin-agent Bot 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.

Robin Review found 1 potential issue.

Open in Robin

Comment on lines +1696 to +1699
const resolvedBackend =
typeof backend === "function"
? await resolveBackend(backend, request)
: backend;

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.

🟡 Backend factory receives the model request instead of a BackendRuntime

resolveBackend(backend, request) passes the whole ModelRequest to the factory, but BackendFactory expects a BackendRuntime: a Runtime with fields like context, store, config and configurable at the top level, plus state. On a ModelRequest, those runtime fields are nested under request.runtime, so runtime.context, runtime.store, etc. are undefined inside the factory.

This path is new: before this PR, wrapModelCall never called the factory. A factory that picks a backend from runtime data, such as (rt) => sandboxFor(rt.context.userId), will now throw on every model call. A factory that falls back quietly can return a different backend, so the execute guidance won't match the backend the tools actually use.

The filesystem middleware's wrapModelCall already handles this correctly in fs.ts:

await resolveBackend(backend, { ...request.runtime, state: request.state })

Use the same shape here. The explicit typeof backend === "function" branch is also unnecessary, because resolveBackend already handles both cases.

(Refers to lines 1696-1699)

Suggested change
const resolvedBackend =
typeof backend === "function"
? await resolveBackend(backend, request)
: backend;
const resolvedBackend = await resolveBackend(backend, {
...request.runtime,
state: request.state,
});

@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

deepagents-acp

npm i https://pkg.pr.new/deepagents-acp@1085

deepagents

npm i https://pkg.pr.new/deepagents@1085

@langchain/sandbox-standard-tests

npm i https://pkg.pr.new/@langchain/sandbox-standard-tests@1085

@langchain/daytona

npm i https://pkg.pr.new/@langchain/daytona@1085

@langchain/deno

npm i https://pkg.pr.new/@langchain/deno@1085

@langchain/modal

npm i https://pkg.pr.new/@langchain/modal@1085

@langchain/node-vfs

npm i https://pkg.pr.new/@langchain/node-vfs@1085

@langchain/quickjs

npm i https://pkg.pr.new/@langchain/quickjs@1085

commit: 339474c

Co-authored-by: Robin <open-swe@users.noreply.github.com>
@robin-agent robin-agent Bot changed the title fix(skills): correct supporting file and script guidance fix(deepagents): correct supporting file and script guidance Nov 18, 2026

This branch was successfully deployed

1 active deployment
Preview — 339474c7 Deployed Nov 18, 2026 by vercel[bot]
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.

1 participant