Repository navigation
fix(deepagents): correct supporting file and script guidance - #1085
Mason Daugherty (mdrxy) wants to merge 2 commits into
Conversation
Resolve supporting paths relative to skills and only suggest execution for sandbox backends. Co-authored-by: Robin <open-swe@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 339474c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
| const resolvedBackend = | ||
| typeof backend === "function" | ||
| ? await resolveBackend(backend, request) | ||
| : backend; |
There was a problem hiding this comment.
🟡 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)
| const resolvedBackend = | |
| typeof backend === "function" | |
| ? await resolveBackend(backend, request) | |
| : backend; | |
| const resolvedBackend = await resolveBackend(backend, { | |
| ...request.runtime, | |
| state: request.state, | |
| }); |
deepagents-acp
deepagents
@langchain/sandbox-standard-tests
@langchain/daytona
@langchain/deno
@langchain/modal
@langchain/node-vfs
@langchain/quickjs
commit: |
Co-authored-by: Robin <open-swe@users.noreply.github.com>
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)