Skip to content

fix(deepagents): return raw file content from BaseSandbox.read() - #766

Open
Christian Bromann (christian-bromann) wants to merge 2 commits into
mainfrom
cb/fix-sandbox-read-double-line-numbers
Open

fix(deepagents): return raw file content from BaseSandbox.read()#766
Christian Bromann (christian-bromann) wants to merge 2 commits into
mainfrom
cb/fix-sandbox-read-double-line-numbers

Conversation

@christian-bromann

Copy link
Copy Markdown
Member

Summary

The sandbox awk command was numbering lines, then read_file numbered them again. Other backends already return raw content.

  • BaseSandbox.read() was emitting cat -n style line numbers from awk, and read_file numbered the same content again, so the model saw a doubled gutter.
  • The sandbox now returns raw file content like the other backends; the tool still owns the single gutter. Python already works this way (BaseSandbox paginates raw text, middleware calls format_content_with_line_numbers once).

Test plan

  • pnpm vitest run in libs/deepagents (1384 passed)
  • Regression tests for raw sandbox output + single read_file gutter
  • Changeset added for affected package(s)

The sandbox awk command was numbering lines, then read_file numbered
them again. Other backends already return raw content.
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c3b08be

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

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
deepagentsjs-ui Ready Ready Preview Aug 19, 2026 4:59am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

deepagents-acp

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

deepagents

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

@langchain/sandbox-standard-tests

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

@langchain/daytona

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

@langchain/deno

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

@langchain/modal

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

@langchain/node-vfs

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

@langchain/quickjs

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

commit: c3b08be

@open-swe open-swe 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.

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in WebView Open SWE trace

Comment thread libs/deepagents/src/backends/sandbox.test.ts Outdated
The mock always returns raw lines now. The regression asserts the
awk printf emits only the line body, without pinning a specific %Nd width.
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.

2 participants