Repository navigation
Conversation
Prototype from the 2026-11-16 cost analysis: the run response reports call counts and keeps every denied or failed call, clips large diffs, and returns paths relative to the working directory; read() returns the file text exactly; the binding docs move from server instructions to the tool description. verbose: true returns the full call log and diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lts, output cap
Denied calls, errors and changed files are always listed whole. A large
diff becomes a diffStat of at most 10 files; anything cut from the response
(diff or output above the 10k-token cap) is kept in memory for this server
session and read back with readOverflow(id), so no state-dir path leaks and
nothing accumulates on disk. grep() returns {columns, rows}; a long string
result comes as a second plain-text block. Result paths use the canonical
cwd, and names such as ..env stay relative. The tool description keeps only
the binding signatures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… bootstrap CIs, harder tasks Arms of one host run back to back per task with the order rotated each round; every arm gets the same warm-up run, kept out of the numbers. A B0/C0 arm runs another agent-code-mode build (--acm-ref or --acm-dist) in the same matrix. The report adds real request counts, pass@1 and pass^k, cost per solved task and paired cluster-bootstrap 95% CIs. T9-T12 add multi-file, contract-preserving and edge-case tasks with hidden tests. Run workspaces now live outside the repository so agents cannot read hidden tests or solutions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…byte bypasses
cat/head/tail/wc/ls with a relative glob and a known option set have the
glob expanded at prepare time: every match is resolved inside the working
directories, checked against Read deny/ask rules, written into the command
as a quoted literal list after --, and its identity (dev, ino, type) is
checked again right before spawn. Hooks and rules see the command that runs.
Fixes in the shell analysis, each with a bash-oracle test and an attack test:
- Claude: brace expansion ({/outside,x}) let an allowed reader open a file
outside the workspace; brace, ~user, shopt and bash -O now make the command
uncertain.
- Claude: words were sliced by UTF-16 index from byte offsets, so text such
as 'echo é; rm -rf x' hid rm from a deny rule; slicing is now by byte.
- Codex: {rm,-f,x} and $"rm" escaped a forbidden rule; words bash rewrites
are marked inexact and a rule that may match them asks (denied).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… bench tests - Glob matches and their order now come from the same bash and environment that run the command (locale, GLOBIGNORE, BASHOPTS), started without startup files or BASH_ENV; the byte-order JS matcher assumed LC_ALL=C and disagreed with bash under UTF-8 locales. Expansion stays off on Windows. The oracle test runs under C, C.UTF-8, en_US.UTF-8 and pt_BR.UTF-8. - memory-tool-runtime D5 compared paths built from an unresolved tmpdir. - bench: pick the run record by its warmup flag instead of readdir order; run npm through node's npm-cli.js and use a junction on Windows; give the verifier cleanup hook room on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…put cap - Claude and Codex shell analysis: empty quotes left no mark, so ''a=~/x looked like an assignment and a tilde bash keeps literal was expanded (a Read-denied file was readable); NAME+= and NAME[i]= are assignments to bash too (a Codex forbidden rule was bypassed with a+=~). Tilde positions now follow bash, with a bash-oracle property test in both analyzers and attack tests. - Output cap: denied calls and errors were cut by entry count. When they do not fit whole they now come grouped by (tool, reason) with exact counts, then with reasons clipped to 200 chars, and only then with a counted marker; the full list stays in the overflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and test The bash that lists glob matches during prepare inherited the server environment minus BASH_ENV/ENV, so an exported function (BASH_FUNC_shopt%%) or SHELLOPTS=xtrace with a command substitution in PS4 ran code before the call was authorized. It now gets only the locale variables and GLOBIGNORE, with glob options from BASHOPTS applied as explicit 'builtin shopt -s', and uses builtin shopt/printf. When the environment would change the result in a way this cannot reproduce (compat*, unknown options, noglob, posix, GLOBSORT, BASH_COMPAT, POSIXLY_CORRECT, LOCPATH) the glob is not expanded. The expand test no longer creates b.js and B.js on case-insensitive file systems. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hen BASH_ENV is set - Read BASH_VERSINFO from the commit bash with an empty environment and only apply what that version reads from the environment (BASHOPTS since 4.1, BASH_COMPAT since 4.3, GLOBSORT since 5.3); bash 3.2 on macOS ignores BASHOPTS, so applying dotglob from it handed readers hidden files the written command would not read. Unknown version: no expansion. - Resolve the literal directory prefix of a pattern inside the jail before bash lists it, and do not expand when a glob sits before the last '/'; bash otherwise followed directory symlinks out of the workspace while listing. Refusals no longer name anything outside the workspace. - Do not expand when BASH_ENV is set: the commit bash would read it and it can change glob options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nstall for Claude - T13 (two bugs at the seam of an async job queue), T14 (streaming CSV parser) and T15 (migrate 36 modules to a new HTTP API, with look-alikes that must not change), all graded by hidden tests; checkScope can allow named deletions. - Claude arm C: native file/shell tools and `run` side by side, with its own tool surface check and parser fixture. - `serve --hybrid` appends one line to the run description saying when to batch with run and when a native tool is enough; without the flag the description is unchanged. `install --host claude` now emits it, since Claude Code keeps its native tools next to run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-test leak check room on slow runners The Windows runner checked the task fixtures out with CRLF, so the verifier tests did not find their exact snippets and a CRLF test hook broke bash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every case builds git workspaces and runs node --test on them, which went past the 20 s default on the Windows runner (verifier T3 timed out on b8ee1a6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The callers, shims and mapping-rule cases of T15 were the longest verifier file; each part now runs in its own process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same reason as the dry runs: they drive main() end to end and compete for the CPU with the other test files on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
runcheaper per task and closes three shell-analysis bypasses found while doing it. Base:feat/integration(#7).Why
On 2026-11-16 the benchmark had agent-code-mode costing more than Claude Code's native tools in 7 of 8 tasks. Almost all of the gap was cache writes, coming from what each
runresponse sent back: the full call log, the full diff and absolute paths.What changes
runresponsesdiffStatof at most 10 files.readOverflow(id). The response never names a path in the state directory.grep()returns{columns, rows}, and a long string result comes as a second plain-text block.cat,head,tail,wcandlswith a relative glob, using a known option set, no longer get denied:$(...), variables, redirection,-Randrgstay as before.cat {/outside/file,x}read a file outside the workspace underBash(cat:*).echo é; rm -rf x, the multi-byte text hidrmfrom a deny rule, because words were sliced by UTF-16 index from byte offsets.{rm,-f,x}and$"rm"got past a forbidden rule.B0/C0arm runs another build (--acm-ref,--acm-dist) in the same matrix.Verification
npm run verify: 841 passed, 1 skipped.''a=~/x(Claude) anda+=~(Codex) tilde bypasses;BASH_FUNC_*andSHELLOPTS/PS4, which ran code during prepare.c63b362(this PR's base), B =3454a9d. Median USD per run:Mean difference per run, paired cluster bootstrap, 95% CI:
The B arm measured
3454a9d. Later commits only change shell analysis and the output cap's over-limit path.Bench tasks T13–T15, hybrid arm,
serve --hybrid(0e8089d)runside by side.serve --hybridadds one line to therundescription saying when to batch withrunand when a native tool is enough. Without the flag the description is unchanged byte for byte.install --host claudenow emits--hybrid, because Claude Code keeps its native tools next torun.runfor 10 of its 13 calls.Known limits
open. Native Claude Code does not check at all.🤖 Generated with Claude Code