Skip to content
Specialist context agent · Code

Dependency Upgrader

A dependency upgrade agent for Claude Code, Codex and Cursor

Dependency Upgrader upgrades a public GitHub repository within its semver ranges, fixes the project's code when that breaks its tests, and returns the diff and the results. It works from the context ContextStream picks for the job.

Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.

Or run it in the ContextStream web app, signed in with your ContextStream account. Version 1.0.0 · Updated

What does Dependency Upgrader do?

Upgrades a public GitHub repo within its semver ranges and runs its tests; when the upgrade breaks them, fixes the project's code. Returns the diff and the results.

What it declines

It does one job. A task like one of these is declined with a reason:

  • Major-version upgrades, pinning or downgrading, or changes to tests to make them pass.
  • Fixing tests that already failed before the upgrade (CI Fixer does that).
  • Private repositories, or anything that needs credentials.
  • Opening pull requests or pushing changes.

What can Dependency Upgrader access, and is it safe to turn on?

Dependency Upgrader gets a short-lived token for one workspace that lets it do only this: call models through ContextStream's model proxy, within a cap set for the run; and read the lessons, preferences and decisions ContextStream picks for its job. It works in one project, only for that run, and declines any task outside its job. Dependency Upgrader is read-only: it changes nothing in your workspace. It runs code only in its own isolated sandbox, which holds no credentials and reaches only 7 allowed hosts. A workspace owner or admin turns it on.

Model agent with a sandbox. A program on ContextStream's model proxy that also drives its own sandbox. The sandbox holds no credentials. Its sandbox reaches github.com, codeload.github.com, objects.githubusercontent.com, release-assets.githubusercontent.com, registry.npmjs.org, pypi.org, files.pythonhosted.org. It is stopped after 30 min.

ScopeWhat it lets a run do
model.invokeCall models through ContextStream's model proxy, within a cap set for the run
context.readRead the lessons, preferences and decisions ContextStream picks for its job

How is Dependency Upgrader tested?

Dependency Upgrader is checked on 10 cases, each with a known right answer: fixture repositories whose upgrade keeps or breaks their tests, inputs it must refuse with a clear error, and requests outside its job it must decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: a breaking upgrade is fixed with the tests really passing in a sandbox, the upgrade itself is kept, the fix changes only the expected files, and it never changes a test, CI file, manifest or lockfile or adds code that detects a test runner. The tests really run in a sandbox on fixture repositories, with scripted model replies and no network, so the cases check the upgrade, the repair loop and its safety rules, not the live model's own fixes. Version 1.0.0 passes all 10.

It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.

What does a real run of Dependency Upgrader look like?

The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.

Live run on ContextStream

Upgrading unjs/defu within its ranges (version 1.0.0)

Version
1.0.0
Outcome
succeeded
Ran
2026-10-28 00:12 UTC
Took
19.4 s

ContextStream's Demos workspace, on the public repository github.com/unjs/defu at 82632b66. The agent ran in an E2B sandbox, started for this run and removed after it.

Input
{
  "repo_url": "https://github.com/unjs/defu",
  "ref": "82632b66f5914e9946edce300e10633a3d5c0cb7"
}

Result

Upgraded within the declared ranges (2 files changed); tests pass.

Result

pnpm: 2 files changed; pnpm test passed (exit 0).

upgrade.patch

diff --git a/package.json b/package.json
index e255cf5..68d78b9 100644
--- a/package.json
+++ b/package.json
@@ -34,17 +34,17 @@
     "test:types": "tsgo --noEmit"
   },
   "devDependencies": {
-    "@types/node": "^25.8.0",
+    "@types/node": "^25.9.9",
     "@typescript/native-preview": "7.0.0-dev.20260516.1",
-    "@vitest/coverage-v8": "^4.1.6",
+    "@vitest/coverage-v8": "^4.1.12",
     "changelogen": "^0.6.2",
     "eslint-config-unjs": "^0.6.2",
-    "expect-type": "^1.3.0",
+    "expect-type": "^1.4.0",
     "oxfmt": "^0.50.0",
-    "oxlint": "^1.65.0",
+    "oxlint": "^1.90.0",
     "typescript": "^6.0.3",
     "unbuild": "^3.6.1",
-    "vitest": "^4.1.6"
+    "vitest": "^4.1.12"
   },
   "packageManager": "[email protected]"
 }

Test output


> [email protected] test [path]/work/repo
> pnpm lint && pnpm test:types && pnpm vitest run


> [email protected] lint [path]/work/repo
> oxlint src && oxfmt --check src test

Found 0 warnings and 0 errors.
Finished in 9ms on 3 files with 96 rules using 2 threads.
Checking formatting...

All matched files use the correct format.
Finished in 22ms on 7 files using 2 threads.

> [email protected] test:types [path]/work/repo
> tsgo --noEmit


 RUN  v4.1.12 [path]/work/repo

 ✓ test/defu.test.ts (21 tests) 10ms
TAP version 13
# Subtest: isPlainObject
ok 1 - isPlainObject
  ---
  duration_ms: 0.82531
  type: 'suite'
  ...
 ✓ test/utils.test.ts (2 tests) 4ms

 Test Files  2 passed (2)
      Tests  23 passed (23)
   Start at  00:13:24
   Duration  379ms (transform 60ms, setup 0ms, import 87ms, tests 13ms, environment 0ms)

Checks: 5 of 5 passed
  • clone: Cloned https://github.com/unjs/defu at 82632b66f5914e9946edce300e10633a3d5c0cb7.
  • lockfile: Found a lockfile for pnpm.
  • upgrade: Upgraded within the declared ranges and installed.
  • tests: `pnpm test` passed.
  • workspace_context: 0 context items from ContextStream for this job, about 308 tokens.
  • Lockfile changes are left out of the patch shown here.
Task
07f449dc-74d1-4d78-bdd5-b185a55c6ebb
From its test suite, not a live run

An upgrade that renamed an export, and the fix (version 1.0.0, test case)

Version
1.0.0
Outcome
succeeded
Ran
2026-10-27 17:17 UTC
Took
Not timed (test data)

The agent's offline test suite: its real program, against a stand-in for ContextStream, a scripted model and a fixture repository, with no network. Not a live run.

What it ran on

  • Its test suite, in the agents' source repository
Input
{
  "repo_url": "https://github.com/eval/greeter"
}

Result

Upgraded within the declared ranges (2 files changed). The upgrade broke the tests; a 2-line fix makes them pass. casekit 1.1.0 renamed its toTitle export to titleCase.

Result

npm: 2 files changed; npm test passed (exit 0).

The upgrade broke the tests, and the fix

casekit 1.1.0 renamed its toTitle export to titleCase.

upgrade.patch

diff --git a/src/greet.js b/src/greet.js
index f2d839b..9ed89d4 100644
--- a/src/greet.js
+++ b/src/greet.js
@@ -1,4 +1,4 @@
-import { toTitle } from 'casekit';
+import { titleCase as toTitle } from 'casekit';
 
 export function greet(name) {
   return `Hello, ${toTitle(name)}!`;

fix.patch

diff --git a/src/greet.js b/src/greet.js
index f2d839b..9ed89d4 100644
--- a/src/greet.js
+++ b/src/greet.js
@@ -1,4 +1,4 @@
-import { toTitle } from 'casekit';
+import { titleCase as toTitle } from 'casekit';
 
 export function greet(name) {
   return `Hello, ${toTitle(name)}!`;

Test output


> [email protected] test
> node --test

TAP version 13
# Subtest: greets by name, in title case
ok 1 - greets by name, in title case
  ---
  duration_ms: 0.4108
  type: 'test'
  ...
1..1
# tests 1
# suites 0
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 36.03147
Checks: 6 of 7 passed
  • clone: Cloned the repository.
  • lockfile: Found a lockfile for npm.
  • upgrade: Upgraded within the declared ranges and installed.
  • tests_after_upgrade: `npm test` exited 1.
  • baseline: `npm test` passes before the upgrade, so the upgrade broke it.
  • tests: `npm test` passes after a 2-line fix to 1 file.
  • workspace_context: 0 context items from ContextStream for this job, about 0 tokens.
  • Lockfile changes are left out of the patch shown here.
Test case
renamed-export, in its test suite
Depot run
0zb9r381xr

Which tools does Dependency Upgrader work with?

Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Dependency Upgrader. It also runs from a terminal or an agent's shell with csa run dependency-upgrader, and from the ContextStream web app.

  • Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Dependency Upgrader.
  • A terminal or an agent's shell: csa run dependency-upgrader, installed with ContextStream's command line.
  • The web app: the workspace's agent library.

How do I turn Dependency Upgrader on?

An owner or admin of your ContextStream workspace turns Dependency Upgrader on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.

  1. Sign in to ContextStream: the button below opens the agent library on Dependency Upgrader.
  2. An owner or admin switches Dependency Upgrader on for the workspace.
  3. Pick the project it works in, and run it from the library, from your coding agent or with csa run.

How do I call Dependency Upgrader from Claude Code or Codex?

Ask your coding agent to hand the job to Dependency Upgrader, or call it yourself: csa run dependency-upgrader in a terminal, or agents(action="run", agent="dependency-upgrader", input={...}) over MCP.

Connect ContextStream's MCP (it also writes each editor's connection):

curl -fsSL https://contextstream.io/scripts/mcp.sh | bash

Upgrades defu within its ranges, runs its tests, and fixes its code if the upgrade breaks them. Over MCP:

agents(action="run", agent="dependency-upgrader", input={"repo_url":"https://github.com/unjs/defu","ref":"82632b66f5914e9946edce300e10633a3d5c0cb7"})

In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):

csa run dependency-upgrader repo_url=https://github.com/unjs/defu ref=82632b66f5914e9946edce300e10633a3d5c0cb7

Input

FieldTypeWhat it is
repo_urlstring, required
refstring
subdirstring
test_commandstringOverrides the default test command for the detected installer.

What does Dependency Upgrader cost?

Dependency Upgrader costs 8,000 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (1 run of Dependency Upgrader, if spent on nothing else), and Pro is $19 a month with 25,000.

A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.

Code

CI Fixer

failing test fix agent

CI Fixer reproduces a failing test command in a public repository and returns the smallest change to the project's code that makes it pass, with the passing output.

Checked on 13 test cases with known answers: all 13 passv0.1.0
Code

Code Oracle

code search agent

Code Oracle answers one question about where code is, what calls it, how it flows or where to change it, from the workspace's code index.

Tested on 212 real code questions, replaying recorded live runs: 202 passv0.2.0
Code

Docs Drift

documentation drift agent

Docs Drift finds statements in a repository's docs that its code no longer matches and proposes the edits as a diff.

Checked on 7 test cases with known answers: all 7 passv0.1.0

Every ContextStream agent