Audit a public repo
wfrun_V24uqbApHZHQqv_x · 2026-11-185:46Loading the run
Tangle runs your agents on their own Linux machines, routes their model calls and records every step.
$ npm install @tangle-network/sandboxnpm test fails. Find the cause and fix it.”npm testnot ok 4 - [null-guard] a user without a name is anonymouspackages/cli/src/flags.jspackages/shared/src/format.jspackages/shared/src/dates.jsnpm test # pass 9 # fail 0Pick one to replay a real session recorded in a Tangle sandbox, then run it on your own account.
Output recorded from the tangle CLI against production. Sign in once and the commands run on your account.
Coding agents run commands and edit files. On Tangle they do it on a Linux machine made for that run, and you get the changes back with a record of each step.
import { Sandbox } from "@tangle-network/sandbox";
const client = new Sandbox({
apiKey: process.env.TANGLE_API_KEY!,
baseUrl: "https://sandbox.tangle.tools",
});
// The agent drives the sandbox's own Chromium with Playwright.
const box = await client.create({
backend: { type: "claude-code" },
resources: { cpuCores: 2, memoryMB: 4096 },
// The default allowlist, plus Playwright's CDN and the one site it reads.
egressPolicy: {
mode: "strict",
includeImplicitDomains: true,
allowDomains: ["cdn.playwright.dev", "playwright.download.prss.microsoft.com", "news.ycombinator.com"],
},
});
try {
const run = await box.prompt(
"Install Playwright with Chromium. Open https://news.ycombinator.com, " +
"save a full page screenshot to /home/agent/front.png, and write the five " +
"top story titles to /home/agent/top.json as a JSON array of strings.",
);
if (!run.success) throw new Error(run.error);
console.log(JSON.parse(await box.read("/home/agent/top.json")));
await box.fs.download("/home/agent/front.png", "front.png");
} finally {
await box.delete();
}executable_path.Store the token from claude setup-token once. The create request carries only the secret's name, and the agent's model calls bill to your plan.
$ tangle secret create CLAUDE_TOKEN --value-stdin <<< "$CLAUDE_CODE_OAUTH_TOKEN"$ tangle sandbox create --name my-claude --backend claude-code \
--cli-auth CLAUDE_TOKEN \
--git-url https://github.com/your-org/your-repo --idle-timeout 900$ tangle agent prompt my-claude "Find the failing test and fix it." \
--session fix-tests --stream| Credential | Model usage is billed to |
|---|---|
| Claude subscription | Your Claude plan |
| ChatGPT plan or OpenAI key | Your ChatGPT plan or OpenAI account |
| Coding plan | That provider |
| Tangle Router (default) | Your Tangle credit |
fleet.spend() reads the total, and fleet.cancel() stops every agent still running.
import { Sandbox } from "@tangle-network/sandbox";
const client = new Sandbox({
apiKey: process.env.TANGLE_API_KEY!,
baseUrl: "https://sandbox.tangle.tools",
});
// Claude Code harness, DeepSeek V4.1 Flash. The Platform refuses any charge past $2; this script stops everyone at $0.20.
const ideas = ["a lookup table", "a streaming parser", "fewer allocations",
"worker threads", "WebAssembly", "a hand written tokenizer"];
const fleet = await client.fleets.create({
agents: ideas.map((idea) => ({
task: `Make bench/parse.js faster with ${idea}. Report the speedup.`,
})),
placement: "dedicated",
defaults: {
git: { url: "https://github.com/tangle-network/sandbox-demo" },
backend: { type: "claude-code", model: { model: "deepseek/deepseek-v4.1-flash" } },
},
budgetUsd: 2,
});
const softCapUsd = 0.2;
async function checkSpend() {
const { spentUsd } = await fleet.spend();
if (spentUsd < softCapUsd) return;
clearInterval(watch);
const { interrupted } = await fleet.cancel();
console.log(`$${spentUsd.toFixed(2)} spent, ${interrupted} agents stopped`);
}
const watch = setInterval(() => void checkSpend().catch(console.error), 5_000);
try {
const results = await fleet.runAll();
// status: completed, failed, cancelled or budget_exhausted
for (const r of results) console.log(r.agentId, r.status, r.costUsd);
} finally {
clearInterval(watch);
await fleet.delete();
}| Setup | Fleet spend, USD | Observations | Recorded interval | Recorded annotation | |
|---|---|---|---|---|---|
| Fleet spend, USD | 0:10 | $0.03 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:15 | $0.04 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:20 | $0.05 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:25 | $0.06 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:30 | $0.06 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:35 | $0.07 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:40 | $0.09 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:45 | $0.11 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:50 | $0.11 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 0:55 | $0.13 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 1:00 | $0.14 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 1:05 | $0.17 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 1:10 | $0.18 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 1:16 | $0.20 USD | observation count unknown | not recorded | |
| Fleet spend, USD | 1:20 | $0.21 USD | observation count unknown | not recorded |
| Target | Kind | From | To |
|---|---|---|---|
| softCapUsd = 0.2 | stretch | $0.20 USD | $0.20 USD |
| Event | Kind | from | to |
|---|---|---|---|
| fleet.cancel() at 1:20, $0.21 | event | 1:20 |
Compute, inference and observability draw on one balance.
No included credit
$29.99 credit each month
$99 credit each month
- git: { url: "https://github.com/tangle-network/sandbox-demo" },+ git: { url: "https://github.com/your-org/your-repo" }, $ npm install @tangle-network/sandbox $ export TANGLE_API_KEY=sk-tan-… $ npx tsx fix-a-test.mts