Systems cost

Generated by pnpm bench. What enforcement costs, apart from what the model costs. No model is in any span on this page: the in-process path drives the scripted adversary against one fixed world, and the toolshare path drives the real MCP server with the frames a client would send.

  • SharedOS: 1.0.0-preview
  • Measurement rules: version 1
  • Workload: 24 issuable attempts per turn, 200 measured turns after 60 discarded
  • Cases: forged-grant, hidden-tool, read-to-mutation, namespace-crossing, tool-ceiling-escape, invalid-tool-result, grant-material, rollback-unavailable, record-completeness
  • Environment: node v22.14.0, platform linux-x64, cpu AMD EPYC 7571, cores 2, memoryGb 8

Percentiles are nearest-rank: a printed p95 is a duration that occurred, not an interpolation between two that did. Throughput is 1000 / mean, not 1000 / p50, because a median discards the tail that makes a stream of operations slower than its typical member.

Taking one measurement costs 0.18 µs at the median over 4096 samples. It is printed rather than subtracted: subtracting it would produce a number that is neither the operation nor the measurement of it.

— in the wire-bytes column is the legend's "declared not to apply on this path": an in-process row has no transport to count. It is not a pending measurement.

Enforcement cost

ComponentPathp50p95TokensEvidence bytesWire bytesOps/secn
Capability authorizationin-process279 µs879 µs01131 B—23794200
Capability authorizationmcp-toolshare277 µs881 µs01092 B—23994200
Execution-record writein-process17.8 ms21.8 ms052989 B—55200
End-to-end SharedOS overheadin-process934 µs3.91 ms01072 B—7584800
End-to-end SharedOS overheadmcp-toolshare954 µs3.89 ms0922 B489 B7554800

Every 0 in the token column is structural: it is asserted from the absence of a model call inside the span, not measured by counting one.

What each row measured

  • Capability authorization — in-process. One operation is one authorization decision: the turn-boundary load, and each in-turn check. pooled over 200 turn-boundary loads (p50 0.845 ms) and 4000 in-turn checks (p50 0.276 ms).
  • Capability authorization — mcp-toolshare. One operation is one authorization decision: the turn-boundary load, and each in-turn check. pooled over 200 turn-boundary loads (p50 0.832 ms) and 4000 in-turn checks (p50 0.275 ms).
  • Execution-record write — in-process. One operation is one record assembled, validated, and serialized. one turn's evidence, re-assembled; the same code on both paths, so it is measured once.
  • End-to-end SharedOS overhead — in-process. One operation is one mediated tool call. the envelope's mediation of one call, provider subtracted by call id.
  • End-to-end SharedOS overhead — mcp-toolshare. One operation is one mediated tool call. one tools/call frame in to its response out, provider subtracted by call id; the transport and the process boundary lie outside this span by its own definition, and so does the vendor CLI's own tool router.

Where one mediated call goes

Every segment below is a span carrying the call's own id, so the remainder is a subtraction rather than a name for what went unmeasured. It is the defensive copies, the schema validation, and the two execution events a call leaves behind.

Shares are totals over the whole run, not ratios of medians. A segment appears fewer than once per call because the envelope refuses some calls before the kernel is reached at all -- a guess at an unexposed tool never resolves a catalogue -- and that is the column headed Per call.

in-process

Segmentp50Share of the callPer call
Resolve the effective catalogue16.5 µs1%0.833
Discovery filter221 µs14%0.833
Authorization decision, audit included276 µs22%0.833
Provider (not enforcement)69.9 µs11%0.625
Remainder379 µs53%1
Whole call1 ms100%1

mcp-toolshare

Segmentp50Share of the callPer call
Resolve the effective catalogue16.2 µs1%0.833
Discovery filter217 µs13%0.833
Authorization decision, audit included275 µs22%0.833
Provider (not enforcement)72.8 µs12%0.625
Remainder417 µs53%1
Whole call1.03 ms100%1

Harness translation cost

The adapter layer, with no model in any span. One operation is one call's round trip through the vendor's shapes: interpret the frame that carries the call, and encode the result that answers it. describeTools runs once per turn rather than once per call and is outside these figures.

Standard is the native harness's own layer, on the same terms: one chat-completions reply decoded, each call's name and arguments read back into the catalogue's, and the result encoded as the tool message the model reads. The tool-name codec is built once per turn, as the driver builds it, and is outside the figure for the same reason describeTools is.

ColumnParse + translate per callCatalogue widthn
Adversary—17—
Standard12.1 µs17200
Codex5.16 µs17200
Claude Code11.9 µs17200
DeepSeek10.9 µs17200
Pi12.4 µs17200

Adversary's — is the absence of a translation layer, not a pending measurement.

The width is the catalogue SharedOS served. A harness that republishes it behind a proxy tool of its own -- Pi's installed extension does -- changes what the harness serializes, not what was served, and that is a property of the extension rather than a measurement this bench can take.

Structural footprint of this run

QuantityValue
Record bytes per turn54446 B mean
Authority loads per turn1
Decisions per turn20
Audit events per turn48
Mediated tool calls per turn24
Catalogue served per turn9103 B over the wire, 17 tools