#813

Persist large web_fetch bodies to sandbox files

OpenBortlesboatwants to merge intofrom

Closes #781

What changed

  • save oversized web_fetch response bodies under .open-harness/web-fetch instead of only truncating them inline
  • return preview metadata alongside status, contentType, bytes, truncated, and savedBodyPath
  • show the fetch preview and saved-path details in the fetch renderer
  • add coverage for both oversized and inline response flows

Verification

  • npx -y bun@1.3.8 test packages/agent/tools/tools.test.ts
  • npx -y bun@1.3.8 run typecheck -- --filter=@open-harness/agent --filter=web
  • npx -y bun@1.3.8 x ultracite check packages/agent/tools/fetch.ts packages/agent/tools/tools.test.ts apps/web/components/tool-call/renderers/fetch-renderer.tsx

Activity

6
vercel[bot]7mo ago

@Bortlesboat is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot]reviewed7mo ago
vercel[bot]7mo ago

Additional Suggestion:

Stale -o >(head -c ... >&3) curl flags from the old implementation left in the args array cause a broken shell command with two -o flags and a reference to unopened fd 3.

Bortlesboat3mo ago

Refreshed this branch onto current main in signed, GitHub-verified commit 7849894.

The test conflict now preserves both the newer approval/SSRF coverage and this PR's small/large response-body coverage. The earlier Vercel review finding is also addressed in the current head: the generated curl command has one -o, writes to $body_file, and contains no stale fd 3/process-substitution path.

Validation on the exact commit:

  • focused tool suite: 25 passed
  • full formatter and lint: passed (597 / 541 files)
  • monorepo typecheck: 4 tasks passed
  • migration/schema check: passed
  • isolated suite reached 105/106 files; the only failure is the untouched upstream Windows path assertion in packages/agent/tools/utils.test.ts (/outside/file.ts is rendered as E:/outside/file.ts). The fetch/tool file itself passed all 25 tests in that same run.