Skip to content

Integrate sandbox, tools and host adapters; install, README, e2e and attack suites - #7

Draft
mths-mcfs wants to merge 57 commits into
feat/scaffoldfrom
feat/integration
Draft

mths-mcfs wants to merge 57 commits into
feat/scaffoldfrom
feat/integration

Conversation

@mths-mcfs

@mths-mcfs mths-mcfs commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Depends on #2 (tools), #3 (sandbox), #4 (bench), #5 (Codex adapter) and #6 (Claude adapter). This branch merges them into feat/scaffold; once they land there, the diff shrinks to the integration itself.

Merged heads: feat/tools 28f276b, feat/sandbox 81756db, feat/host-claude da66562, feat/host-codex ff6d7e0, feat/bench 7bc5608 (merge commits, no rebase).

Summary

agent-code-mode serve --host claude|codex|generic
  recoverStaleJournals(state dir, server cwd)           # and once per new workspace root on first run
  createRuntime(host)
    claude  -> Claude context provider (+ companion-hook store) + ClaudeHostAdapter
    codex   -> Codex context provider + CodexHostAdapter, run cap = tool_timeout_sec - 10 s (60 s if unknown)
    generic -> built-in policy: read/grep/glob inside the roots, everything else ask (= denied, with the reason)
    + QuickJsSandbox + NodeToolRuntime
agent-code-mode hook                                    # Claude companion hook, prints nothing
agent-code-mode install --host claude|codex [--scope user|project] [--write] [--local]

Contract changes (src/core/types.ts):

 PolicySnapshot
+  additionalRoots?: string[]                 # Claude additionalDirectories; tools jail reads it
+  readFilter?: (realAbsPath) => boolean      # Claude Read deny+ask rules; grep/glob drop and count
 GrepResult / GlobResult
+  filtered: number
 PreparedCall
+  requestedPath?: string                     # set by the dispatcher from the script's call, never the runtime
-MatchStrategy = exact | line-trimmed | whitespace-normalized | indentation-flexible
+MatchStrategy = exact | line-endings | line-numbers | trailing-whitespace | indentation | punctuation
 Dispatcher
~  changedFiles and protected-path checks use the real cwd/roots (a symlinked cwd gives ["f"])

Also: one context provider per host (src/server/context.ts keeps only generic + detectHost), the attack suite in test/attack/ (part of npm test), real-host scripts in test/e2e/, the optional AGENT_CODE_MODE_LOG run log, CI installs bubblewrap/socat/ripgrep on Linux and fails if containment tests would skip, README.

Evidence

  • Paid benchmark on 35260ce: 120/120 runs valid and passing, US$ 2.85; sanitized results committed under bench/results/2026-11-16/ (6.8 MB, transcripts uncompressed at 2.6 MB) and summarized in the README.
  • npm run bench -- --dry-run on the merge with feat/bench 7bc5608: DRY RUN 120 runs, 120/120 pass and valid.
  • npm run verify on the final merge: 44 files, 705 tests passed locally, 1 skipped (the CI-only containment guard), build ok. CI green on every job; on Ubuntu 706 passed, 0 skipped, so the bash containment tests really ran (before this PR they were skipped there).
  • Before: under a Codex forbidden rule for rm, the script bash({command: "bash -O extglob -c 'rm -f victim.txt'"}) ran (RAN, victim deleted).
    After: denied, victim kept (an option with an operand before -c made the Codex splitter skip the inner script; fixed with tests).
  • Attack suite through run (real sandbox, tools and adapters, fixture configs in temp dirs; each case asserts the denial and an unchanged disk snapshot): sandbox globals and Function('return this')/constructor chains, prototype pollution, runaway CPU/memory; traversal and symlink escapes for read/write/edit/grep/glob; protected Claude/Codex config files; 17 disguised rm forms under a Claude deny rule and a Codex forbidden rule (env -S, bash -O extglob -c, $(...), backticks, commandx3, trap, comments, /bin/rm, exec, xargs, find -exec, ...); hooks that crash, time out, print invalid JSON, plain text or a wrong type (both hosts); updatedInput outside the jail; grep/glob over the root skipping Read-denied files; rollback after a denied call; cancellation with no late writes; capped outputs.
  • Real Claude Code 2.1.325, claude -p --model claude-haiku-5-5 --setting-sources project --strict-mcp-config --mcp-config <project>/.mcp.json --tools "" --allowedTools mcp__agent-code-mode__run Write Bash --output-format stream-json --verbose (config from install --host claude --scope project --local --write + the example deny-rm.sh hook), via test/e2e/claude.sh:
    run: host=claude permissionMode=default (source ctx-file)
      c1 write a.txt -> allowed
      c2 read a.txt -> allowed
      c3 bash rm a.txt -> denied: hook: rm is blocked by the example deny-rm hook
    a.txt exists: true
    PASS
    
    With --permission-mode acceptEdits: run: host=claude permissionMode=acceptEdits (source ctx-file), same three decisions, PASS. The tool result the model saw: "rm":{"ok":false,"error":"PermissionDenied: rm is blocked by the example deny-rm hook"}.
  • Real Codex CLI 0.169.0, codex exec --json -C <project> --skip-git-repo-check with model gpt-6-luna (low effort), a temp CODEX_HOME whose auth.json is a symlink to the real one (Codex accepted it), config.toml = the block install --host codex --local --write printed + approval_policy = "never", sandbox_mode = "workspace-write", and hooks.json with the same hook trusted via [hooks.state] trusted_hash (no --dangerously-bypass-hook-trust), via test/e2e/codex.sh:
    {"type":"mcp_tool_call","server":"agent-code-mode","tool":"run", ...}
    run: host=codex cwd source=env
      c1 write a.txt -> allowed
      c2 read a.txt -> allowed
      c3 bash rm a.txt -> denied: hook: rm is blocked by the example deny-rm hook
    a.txt exists: true
    PASS
    agent: "- `rm a.txt`: blocked by the example deny-rm hook."
    

Merge Danger

Door: two-way (no data migration; config is only written by install --write, after showing the diff).

Blast Radius: wide

The server now executes real effects (files, shell) instead of fakes. Claude path rules now also match the path as the script wrote it, so an allow rule written for a symlink target no longer approves a call made through the link (it asks, which is a deny). MatchStrategy names changed (no consumer outside this repo).

Decisions

  • Codex per-tool approval is written as [mcp_servers.agent-code-mode.tools.run] approval_mode = "approve" (key and value found in the Codex 0.169 binary; verified by the real codex exec run): the alternative was the server-wide default_tools_approval_mode.
  • install --local runs the checkout's dist/cli.js with the current Node instead of npx -y agent-code-mode (the package is not published yet; the e2e used it): the alternative was only printing the npx form.
  • Claude user scope prints the claude mcp add command for you to run; --write only edits settings.json and never ~/.claude.json: the alternative was editing ~/.claude.json directly.
  • install does not add an allow rule for run; it tells you to allow it as usual. Adding one would change auto-mode semantics (the classifier would never see the script).
  • Codex config already containing [mcp_servers.agent-code-mode] is left untouched by --write (you compare by hand): the alternative was rewriting the TOML.
  • In the e2e, Claude runs with --tools "" (no native tools, so the model must use run) and --allowedTools ... Write Bash (in default mode a write or bash call inside run would otherwise be refused as an unanswerable prompt before the hook runs): the brief's command allowed only the run tool.
  • grep's filtered counts files skipped (never opened), not matches inside them: counting matches would require reading denied files.
  • grep/glob refuse to run when their prepare-time data is missing (fail closed), as write/edit already did: the alternative was running unfiltered.
  • The Claude Read filter covers Read ask rules as well as deny rules (an ask is a deny here).
  • Journal recovery runs at start for the server cwd and once per new workspace root seen in a run; restored files are reported as warnings in that run's result.
  • New optional AGENT_CODE_MODE_LOG=<absolute file> env: one JSON line per run (context sources and call log), off by default.
  • The generic policy also protects <cwd>/.mcp.json and the state dir.
  • CI on Linux lifts Ubuntu 24.04's AppArmor user-namespace limits (two sysctls and the bwrap-userns-restrict profile, which blocked the nested namespace the sandbox's seccomp helper needs) and fails if the containment tests would be skipped. On a default Ubuntu 24.04 machine sandboxed bash therefore fails closed (every contained command exits 1) until the user does the same: the alternative was skipping the tests in CI.
  • MatchStrategy keeps no aliases for the old four names.
  • Benchmark results are committed in full (transcripts included, 6.8 MB) rather than only the summary.
  • Claude cost stays host-reported; pricing.json gained cacheWrite1h so it can be recomputed (Claude Code writes 1-hour cache entries).
  • Overlapping transactions: per-file ownership, not serialized runs. A transactional run that tries to write a file another unfinished transactional run in the same server already journaled gets an error for that write; reads and other files proceed. The alternative was making a second run on the workspace wait (blocks parallel subagents). Two separate server processes on the same workspace are not coordinated.
  • Crash recovery restores each journal inside the roots its own run recorded (cwd, client roots, additional directories), and keeps a journal when some file could not be restored (reported at every start until it is gone or restorable); a file another process changed since is reported and its entry dropped.
  • Codex writable_roots (and --add-dir) are workspace roots for the tools only in workspace-write; /tmp and $TMPDIR are not.
  • install --host codex --write never edits an existing [mcp_servers.agent-code-mode] table: identical → nothing to do, different → refuses (exit 1) and asks for a manual edit.

🤖 Generated with Claude Code

mths-mcfs and others added 30 commits November 15, 2026 20:28
… bash

Implements the ToolRuntime contract for bash, read, write, edit, grep and
glob in src/tools:

- Workspace jail: paths resolve to real paths under the session cwd, MCP
  roots and configured extra roots; traversal, links leaving the roots,
  Windows alias spellings and NUL bytes are refused. Writes and edits to
  protected host paths and .git are refused.
- Commits re-check what prepare saw: no link at the final component
  (O_NOFOLLOW plus an fd path check), parent directories unchanged, content
  hash equal to the prepared before-hash. Writes are atomic (temp file in
  the same directory, mode kept; creates never replace a file that
  appeared meanwhile).
- Edit uses Turnpack's tolerant matcher (exact, line endings, copied line
  numbers, trailing whitespace, indentation, punctuation), refusing
  ambiguous and missing matches with the nearest text.
- Transactions journal originals in memory and durably under the state
  dir (64 MiB cap), roll back without clobbering external changes, and
  recoverStaleJournals restores journals left by a dead server.
- bash runs in its own process group with output caps, kills the group on
  timeout, abort and exit, and runs under @anthropic-ai/sandbox-runtime
  (bubblewrap or Seatbelt) when the policy asks for containment.
- grep and glob are pure JS with .git, node_modules and .gitignore
  ignores, and never follow links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Protected path patterns are built by the host adapter from the session cwd
as the host spells it. Paths are checked as real paths, so a cwd reached
through a symlink, macOS /var or a Windows 8.3 short name made the patterns
miss. Each pattern now also matches with its literal prefix resolved.
Tests use native real paths so they agree with the runtime on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs each script in a fresh Node child process (empty env, bounded heap,
Node permission model) that hosts a QuickJS-ng VM from the sync WASM
build. Bindings are deferred promises settled by the parent's replies;
the parent validates every child message and kills the child on anything
unexpected, on timeout and on cancel. The WASM memory maximum is the real
heap limit, because QuickJS-ng's own accounting undercounts in this build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lower the default QuickJS stack to 128 KiB: 256 KiB overflowed the Node
stack on macOS with Node 22. A host stack overflow now ends the run as a
RangeError script error. The permission-model test allows the variables
the OS layer adds to every child env (libuv on Windows, macOS's encoding
hint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bench/ runs coding-agent tasks on Claude Code and Codex CLI with native
tools, Codex code mode and agent-code-mode, from a deterministic fixture
repo, and reports turns, tokens, cost, wall time and pass rate per arm.

- fixture/generate.ts: seeded 96-file ES-module project, tests under
  node --test, byte-identical per seed (hash pinned in a test)
- tasks/T1..T8: prompts, bug injection, verifiers and reference solutions
- lib/claude.ts, lib/codex.ts: arm commands and configs, transcript parsers
  (Claude result event; Codex --json usage plus model requests and tool
  calls from the rollout), tool-surface checks per arm
- run.ts: seeded interleaved order, fresh git workspace per run, isolated
  hosts (Claude --setting-sources project; Codex temp CODEX_HOME with a
  copied auth file, always deleted), resumable, --dry-run
- report.ts: summary.json and a Markdown table (median, min-max)
- parser-fixtures: sanitized real native T1 runs from both hosts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Authorize every binding call the way Codex CLI 0.169 authorizes the
equivalent native action: config layers with project trust, exec policy
rules parsed from a safe Starlark subset, sandbox and approval semantics,
and the user's trusted PreToolUse hooks with the native Bash and
apply_patch inputs, fail-closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implements HostAdapter and the context store for Claude Code in
src/hosts/claude: settings from every source with Claude's precedence,
deny/ask/allow permission rules (Bash with a real shell parser, Read/Edit
gitignore-style paths), permission modes, PreToolUse/PostToolUse command and
http hooks with the native payload (fail-closed), sandbox containment,
protected paths, and the companion hook that records trusted session context
keyed by the tool-use id.

Adds sh-syntax (mvdan/sh compiled to WASM, synchronous, no dependencies) to
parse Bash commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Node 22 prints TAP when stdout is not a TTY, so the pass count read 0.
Force the spec reporter and accept either summary format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Paths resolve component by component with POSIX semantics, so
  `link/..` is the parent of the link's target; an oracle test checks that
  a path is accepted exactly when its real path is inside the roots.
- Writes and edits check protected patterns on the real path and on every
  link the resolution went through, and refuse a final-component link.
- grep and glob re-check each directory after listing it and open each
  file without following links, checking the handle is the file at that
  path, so a directory swapped for a link mid-walk leads nowhere.
- grep runs the regular expression in a worker thread with a per-file
  time budget; an abort or an exhausted budget terminates it.
- Commits record dev+ino of the file and its directories at prepare and
  refuse when any changed; check-and-replace of one path holds a
  per-path lock and re-checks the abort signal, identity and content hash
  right before the rename.
- Rollback and crash recovery remove files and directories only through
  real directories strictly inside the roots, never through a link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…early aborts

- Replies to the child go through a writer that respects backpressure and
  caps the bytes waiting for the child (16 MiB) and the bytes sent per run
  (512 MiB); past a cap the run ends with outcome oom (ReplyBufferFull)
  instead of growing the server's memory.
- The child runs with --permission or, on Node 22.0 to 22.12,
  --experimental-permission (one comma-separated read grant with the *
  wildcard, the only form those versions honor). Without either flag the
  sandbox refuses to start.
- The abort listener is registered before onSpawn runs and the signal is
  re-checked after it; no call is forwarded once the signal is aborted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS realpath(3) accepts `file/..` that open(2) refuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before Node 25 the permission model allows the probe's socket; the probe
then exits and resets the connection, which the test server must ignore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dispatcher now commits a frozen structured clone of the prepared call,
so metadata kept by object identity was lost and every write was refused.
It is now kept in a bounded map keyed by a digest of the call's id, tool
and effect, and taken out at commit, so a prepared write commits once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efects

- Hook matchers are Rust regexes: translate the exact subset (\A, \z,
  leading flags, POSIX classes, ...) and let untranslatable matchers
  match every call.
- Scripts that are not plain for Codex (comments, braces, escapes, quoted
  command names, dangling operators) also evaluate as bash -lc <script>.
- Evaluate commands behind wrappers (command, env, sudo, exec, nohup, nice,
  timeout, time, stdbuf, xargs, find -exec, eval) and trap actions; ask
  when a wrapper option is unknown.
- Deny a write/edit whose bytes the apply_patch format cannot show exactly
  when a hook would see the patch.
- Non-JSON hook stdout denies with hook-error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Auto mode: inner calls are allowed only when the run script reached
  Claude's classifier, that is when no allow rule approved the run tool;
  otherwise only reads and edits inside the working directories pass.
- Critical-path rm/rmdir removals always ask (dontAsk denies).
- Bash: parse env -S strings, skip shell option operands (-O, -o,
  --rcfile), strip every wrapper level (cap → ask), ask on alias/hash,
  match run-time words and absolute binaries by every static prefix.
- File targets of sed, awk, grep, cp, dd and other file commands, with
  symlinks resolved in authorize.
- Policy exposes isReadDenied for grep/glob result filtering.
- Hooks deduplicate per event, not across events.
- Context records are claimed with an atomic rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ms, resume, verifiers

- Temp CODEX_HOME links auth.json to the user's file instead of copying it
  (copy only where symlinks fail), is removed on SIGINT/SIGTERM/SIGHUP and at
  exit (running hosts are killed first), and homes left by a killed harness
  are swept at the next start.
- Sanitizer parses JSON lines recursively (strings holding JSON included),
  URL-decodes before matching paths, and redacts values by key name as well as
  by pattern, also inside escaped JSON text. The environment records only
  platform, kernel major.minor and arch.
- Strict agent-code-mode arms mark any native file/shell call invalid; Codex
  native command items in --json count even when the rollout misses them; the
  run-tool classifier matches only the agent-code-mode server's run tool.
- Runs are stored and resumed under a hash of their full config (host version,
  model, effort, seed, fixture, prompt, arm definition, agent-code-mode commit);
  the report never pools different configs. Without --seed a resume reuses the
  last invocation's seed.
- Read-only verifiers require an unchanged workspace; every verifier fails on
  changes outside the task's files; T6 checks exact 2-space formatting.
- Replayed Claude tool results are counted once per tool_use_id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rename() let two concurrent readers win on Windows; O_EXCL creation of a
claim file is atomic on every platform. The grep/glob filter test uses the
POSIX-only in-memory runtime, so it is skipped on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rule like `Bash[rm]` or `Read[./.env]` matched nothing, so a deny the
user meant silently did not apply. Any deny, ask or allow rule that is not
`Tool`, `Tool(specifier)` or an MCP form without a specifier now fails the
policy load, naming the rule and its file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	package-lock.json
#	package.json
…gration

# Conflicts:
#	package-lock.json
#	package.json
…ration

# Conflicts:
#	package-lock.json
#	package.json
Deny and ask globs (`*`, `B*`, `mcp__*`) match the full tool name; allow
globs count only after a literal `mcp__<server>__` prefix, and unanchored
allow globs approve nothing, as the permissions docs define. Forms the docs
do not define still fail the policy load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Temp CODEX_HOME gets a 0600 copy of auth.json again (a symlink is replaced
  when Codex rewrites the file by rename, losing a refreshed or rotated token).
  The marker records the real path and the hash copied. Before a home is
  deleted (end of run, signal, exit, startup sweep), a changed temp copy is
  written back atomically (temp file + rename, 0600) if the real file still
  has the copied hash; if both changed, the real file is kept and a warning
  printed. The run's auth.txt records the outcome.
- Parsers collect denied calls: Claude hook/permission error results and
  agent-code-mode call-log denials; Codex blocked-call outputs from the
  rollout. T8 requires the denial in that log when the run has one, and an
  answer sentence naming the file with a denial that is not negated.
- T1, T3 and T4 require the ANSWER line format the prompts ask for (T1/T4:
  the reply ends with that line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…quested path, canonical cwd

Wire the real QuickJS sandbox, tool runtime and Claude/Codex adapters into
the server, add the generic read-only policy, the install and hook commands,
journal recovery at start, and run the containment tests in CI on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l options before -c in the Codex splitter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mths-mcfs and others added 16 commits November 15, 2026 21:28
…gration

# Conflicts:
#	src/hosts/claude/adapter.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…namespace limits in CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent tests run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Crash recovery restores inside the roots recorded by the crashed run
  (including additional directories), never through a root that now
  resolves elsewhere, and keeps a journal whose entries could not be restored.
- A transactional run may not write a file another unfinished transactional
  run journaled, so overlapping rollbacks restore the true original.
- Codex writable roots reach the tools jail as additionalRoots.
- install --host codex reads config.toml with a TOML parser, finds the server
  table however it is spelled, appends only, re-parses the result and refuses
  instead of writing an invalid file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…discovery

- Claude arm B removes the built-in tools with --tools "" instead of
  --disallowedTools (a CLI deny also denies the tool inside run, by parity) and
  allows the native names by rule, like arm A, so inner calls are allowed.
- Claude runs are isolated from the user's config: CLAUDE_CODE_DISABLE_CLAUDE_MDS
  (Claude loads <ancestor>/.claude/CLAUDE.md, the user memory, for any
  workspace under the home directory, despite --setting-sources project) and a
  temporary CLAUDE_CONFIG_DIR with a copy of .credentials.json (same copy, hash
  and write-back rule as Codex). The init event is checked for user agents,
  plugins and auto memory; the method is recorded in the environment.
- T8 asks for `DENIED: <path>` lines and verifies those plus the denial log;
  the natural-language check is gone.
- protect-file.mjs also blocks file-writing shell commands that reach the
  protected file through its directory (the smoke-run escape walked
  src/handlers in a Python heredoc).
- Codex arm C turns off supports_search_tool in its catalog, so run is exposed
  directly instead of behind tool_search, which direct mode calls as an
  unsupported function. All Codex arms turn off `apps`, which exposed the
  ChatGPT account's connected apps as tools. Arm C must see run directly.
- `npm run bench:report` (defaults to the newest results date).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Claude isolation check was inserted between the surface check and its
else branch, so 'tool surface not observed' was added to every non-Claude run.
The fake-codex harness test now asserts a valid record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry count

The poll counted the atomic-write temp file as a write, so it could stop
after two real files and then find two. Count only completed targets, wait
for the third one, and assert that nothing (file or temp file) appears after
the run settled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iles

A write outside the session cwd produced a diff header like b//abs/path.
Diffs and changedFiles now share one naming rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
<root basename>/<path> collided with a cwd folder of the same name; the
cwd-relative path (../extra/x) is unambiguous and a valid diff path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude: arm A runs with --tools Bash,Read,Write,Edit,Glob,Grep and arm B with
--tools "" plus run, so the only difference is native file/shell tools vs
run (no Task, ToolSearch or web tools in either).

Codex: every arm turns off apps, view_image, image_generation, goals,
multi_agent, sleep_tool, web search, the model's experimental extra tools
(clock) and supports_search_tool, and disables agents (multi-agent tools);
arms A and B get an empty MCP server so they have the same MCP resource tools
as arm C. Every arm then reaches exactly list_mcp_resources,
list_mcp_resource_templates, read_mcp_resource and request_user_input besides
its file/shell route (direct tools, exec, or run). The config is built table
by table so no key lands in the wrong table.

The arm-integrity check now requires these exact surfaces (Claude init tools;
Codex prompt-input, including tools nested in code-mode exec), and the
observed and required surfaces are recorded in the environment block.
Parser fixtures refreshed from a T1 smoke run with these surfaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e OS pipe size

The test required more than 16 calls before a 16 MiB pending-reply cap
overflowed. How many 1 MiB replies fit depends on how much the OS pipe
absorbs (about 64 KiB on Linux, less on macOS and Windows), so it failed
there at exactly 16. Assert the overflow event itself and the lower bound
that holds everywhere, and drop the wall-clock check (the oom outcome
already proves the timeout did not end the run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
calls counts requests the script sent, and all 200 can arrive before the
overflow ends the run (seen on macOS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es, commit the 2026-11-16 run

- record.json was written without the sanitizer, so hook denials kept an
  absolute path with the home directory. Every file the harness writes now
  goes through it, plus a final pass over the results directory;
  bench/sanitize-results.ts cleans older results in place.
- Claude Code writes its prompt cache with the 1-hour TTL (2x input), not the
  5-minute one; pricing.json now has cacheWrite1h and a test recomputes all 48
  committed Claude runs to the cent.
- Sanitized results of the paid run (120 runs, all valid) and the README
  Benchmark section written from them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mths-mcfs and others added 11 commits November 18, 2026 21:51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The verifier cases each build their own workspace, so they run side by
side, two at a time on Windows. The tests that drive main() end to end
move to their own file, which Vitest runs in a separate process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five at a time starved the timing-sensitive suites running in the other
workers, so the limit no longer depends on the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cases that build several workspaces now share the worker with a second
case, and passed the 20 s default on the Windows runner. The 120 s limit
used from economia on moves down to where the cases start running side
by side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cases side by side

The git calls that build each workspace are synchronous, so cases running
side by side in one file barely overlapped. The cases run one after
another again, in their original form, and the long files are split so
that Vitest runs the parts in separate processes. Each verifier file
gets its own temporary root and cleanup, and every verifier case gets
the 120 s timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They drive main() end to end, and on Windows they now compete for the
CPU with the other test files, which put them close to 120 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant