Tide

Authority Is an Argument

In Tide, a checked subset of the Rust language, a function reaches files only through the &Fs it is handed.

The alpha is Tide's first public test release. It runs on Linux on 64-bit x86 processors (x86_64).

pub fn load(fs: &Fs, path: &str) -> Result<Config, ConfigError> {
    parse(&fs.read_to_string(path)?)
}
From Tide's capabilities example, whose tests pass. A version that calls Rust's std::fs::read_to_string and takes no Fs is rejected by admission, the check Tide runs before the code compiles, with TD0501, a numbered Tide diagnostic.

Tide at a glance

Tide is a subset of Rust for code that AI agents write and people have to trust.

  1. It’s Rust. Every Tide program is a valid Rust 2024 crate, compiled by an unmodified rustc pinned to one nightly. No fork.
  2. A checker runs first. tide-admit admits or rejects each crate before rustc compiles it. Its rules’ rejections carry a TD code, such as TD0501, that says why. What rustc rejects, such as a call to a function Tide’s std lacks, gets rustc’s errors.
  3. Authority shows in the signature. Code reaches the outside world through capabilities it is handed (&Fs, &Clock, &Env, &Net, &Proc, &Rand), so a function’s parameters bound what it can do. The claim is no accidental ambient authority in admitted safe code, apart from printing and outside the unsafe grant, up to rustc’s soundness bugs.
  4. Authority can be narrowed. fs.dir(path, mode) confines files to a directory, and only([...]) limits hosts, programs or variables (limits). A network only limits outbound peers, and listening remains possible unless the capability is narrowed with no_bind(). An allowed shell allows anything.
  5. Tests replay. A #[sim_test] runs under a seeded simulator, and tide-admit replays a failing run on the same machine with identical traces. Replay reproduces the simulator’s model, not the machine.
  6. Any change can get a trust diff. tide-admit --tide-diff summarizes what a change may do: public items whose declared authority widened or narrowed, and unsafe sites added or removed. The E3 pilot found no evidence that it helps reviewers.
  7. Built for agents. The core reference that teaches Tide to a model fits a budget of 25,000 tokens.
  8. Known limits. An alpha, x86_64 Linux only. No async, by design, and safe code sees one memory order (costs). Admission closes three known routes through rustc’s soundness bugs, and the others stay open.
  9. Evidence, negatives included. One catch, on a later re-test of one screened crate, not first-time and not a rate, its registration before the fix not independently proven (research/49). The malware screen caught 0 of 87. For the pilot and four of the searches, the order of method and results rests on our own records, and the others’ timestamps show only when their method files existed. A possible security defect appears publicly only as a count. The status page lists every round with its counts and qualifier.

Try it

Open in GitHub Codespaces In the browser, with nothing installed. The codespace builds the repository's dev container. In its terminal, run nix run .#tide-demo. The dev container has no gdb, so there the demo skips step 5, the replay under a debugger. The rustup path runs it on a machine with a gdb built with Python on PATH.

  • With rustup and no Nix. On x86_64 Linux with rustup 1.28 or later, git, and a C toolchain at /usr/bin/cc and /usr/bin/ld (on Debian or Ubuntu, build-essential). rustup toolchain install fetches the nightly that rust-toolchain.toml pins, with rustc-dev and rust-src. A rustup older than 1.28 installs it at the first cargo run, so skip that line there.
    git clone https://github.com/luccahuguet/tide tide && cd tide
    rustup toolchain install
    cargo run -p tide-demo
  • With Nix and no clone. It needs no rustup and no system C compiler. Add --extra-experimental-features 'nix-command flakes' unless both are enabled.
    nix run github:luccahuguet/tide#tide-demo
  • With Docker, a local fallback for macOS and Windows. In a clone, build the try image locally, then run it. The Tide image is built locally rather than pulled from a registry.
    docker build --platform linux/amd64 --target try -t tide-try .
    docker run --rm --platform linux/amd64 tide-try

Each path runs the demo. The sizes and the times measured for each path, with their conditions, are in the README's try-it table.

See it run

Real terminal footage of both claims.

rustc accepts a soundness hole that admission rejects, then a race found by seed and replayed A real terminal recording, 59 seconds, silent. First, Tide's conformance case closure_fnptr_capability.rs uses rustc's soundness bug rust-lang/rust#25860 to turn a borrowed Fs, a file-system capability, into a &'static Fs that outlives the grant it was lent under. Plain rustc, the same pinned nightly the driver uses, accepts it against Tide's std, and echo $? prints 0. Then tide-admit rejects it with TD0206, and echo $? prints 1. That closes one known soundness route, not every one. Second, in the demo's service, record_hit reads the hit count and writes it back in two steps. The simulation test runs under 16 seeds and fails on 8 of them, seeds 0, 2, 4, 8, 9, 10, 12 and 14. Seed 0 is recorded, and the driver's printed replay command, run twice, prints replay reproduced for seed 0 both times. Recorded from real runs of plain rustc and tide-admit, built at Tide revision 18e58d8. The recording script is kept with the site's source. The still is the clip's last frame.

Evidence · a malicious crate, re-tested

Rejected as written, admitted only with its authority declared.

A re-test caught a known-malicious crate under our screen's unchanged caught rule: RUSTSEC-2026-0039, the advisory for chrono_anchor, a crate that tried to send a project's .env files to a server impersonating timeapi.io. The faithful port, the crate's code rewritten in Tide, is rejected, as it already was in the screen: TD0602 twice, on two thread::spawn calls, and TD0501 three times, on two ambient Command::new calls and an ambient thread::sleep. The port that receives the authority it uses as parameters is now admitted, and its trust artifact declares task, clock and process authority. It was not a first try: our pre-registered screen of all 87 malicious-crate advisories in RustSec, Rust's public security-advisory database, caught 0 of 87. Tide's std had a gap, the screen exposed it, we fixed it, and re-tested under a new registration (research/49).

// Faithful port: rejected.
// Its helpers draw TD0602 ×2
// and TD0501 ×3.
pub fn run_optional_syncs() {
    fetch_ref_background();
    submit_snapshot();
}

// Capability-passing port:
// admitted.
pub fn run_optional_syncs<'s>(bg: Scope<'s, '_, TaskError>, clock: &'s Clock, proc: &'s Proc) {
    fetch_ref_background(bg, proc);
    submit_snapshot(bg, clock, proc);
}
run_optional_syncs in the faithful and capability-passing Tide ports. The signatures and calls come from research/49's published diff. We added the closing braces and comments.

Every check is consistent with the re-test's registration being anchored, by an OpenTimestamps proof in a Bitcoin block, before the fix landed, and independent proof of that order is not established.

Not a first-time catch, and not a rate. The one-row pool was chosen after the screen had seen its rows, the outcome was close to predictable, and the screen's result stays 0 caught of 87. The re-test ran admission and type-checking only. No port was executed. Admission does not judge intent. The admitted port still starts the same processes with the same arguments, and what changes is that its authority is declared. Tide found nothing unaided. The code was already known to be malicious, and the port was written from Socket's quote of it. No other search round caught anything else, and one row of one round stays unresolved. The status page lists every round with its counts and its qualifier.

Replay

A concurrency bug becomes an ordinary failing test.

A test that takes a simulated root runs under a seeded simulator of tasks, channels, files, TCP loopback, modeled HTTP peers, declared child-process models, random draws, the clock, the environment and stdin. The seed decides the schedule and every draw. A run through the driver records a manifest, and replay reruns it on the same machine and checks that the event and output traces are identical.

The demo finds a lost update in a small concurrent service on 8 of 16 seeds. It records seed 0 and replays it twice: the recording and both replays have 40 events and identical trace hashes. The fixed revision passes all 16 seeds.

Replay reproduces the simulator's model of the program, not everything it does on a real machine. The simulator does not model CPU time, memory exhaustion, signals, real child processes or kernel behaviour, and replay works only on the same machine with identical pinned artifacts.

Admission

No accidental ambient authority.

Tide's std has no free function that reaches files, the clock, the environment, the network, other programs or randomness. Code reaches the outside world, printing aside, only through capability values it is handed (&Fs, &Clock, &Env, &Net, &Proc and &Rand), so a function's signature bounds what it can do, up to rustc's soundness bugs. The claim is no accidental ambient authority in admitted safe code, apart from printing and outside the unsafe grant (--tide-grant=unsafe), whose code can forge a capability. tide-admit, a driver on a pinned and unmodified rustc, checks every crate before rustc writes anything. A failure of one of its rules is named with a TD code, and code that rustc itself rejects gets rustc's own errors.

Safe code could still forge a capability through a rustc soundness bug. Admission has closed three admitted routes from two open rustc issues: the function-pointer route of rust-lang/rust#25860 (TD0206) and two forms of the trait-object route of rust-lang/rust#57893 (TD0402). A red team tried 48 routes, controls included, against admission and the test sandbox. Every other admission route it lists is rejected, apart from two left admitted on purpose, one that writes only to standard error and one inert crate attribute.

rustc's other open soundness bugs stay open. Against a malicious crate or, later, dependency, safety rests on rustc's soundness, on the routes closed so far and, for test runs the driver starts, on a Landlock and seccomp sandbox. A test binary run directly gets no sandbox, and deployed programs get kernel enforcement only in v1, which is planned.

The trust diff

A summary of what a change may do.

Each admitted crate gets a trust artifact, and tide-admit --tide-diff lists the exported items whose declared authority widened or narrowed and the unsafe sites added or removed. It shows declared authority only, not what code exercises. The E3 pilot below tested it as a review aid and gives no evidence that it helps.

Evidence · E3, pre-registered

The trust-diff pilot was negative.

E3 ran under a protocol frozen before the run. The first paragraph of its report, as published:

In the E3 pilot, Opus and Sol reviewed 12 planted authority-widening changes repeatedly, 6 times per change in each arm. With the trust diff, 66 of 72 review sessions caught the planted widening; with the plain diff, 67 of 72 (ratio 0.99, 95% interval [0.95, 1.00]). This does not meet D0's 1.5x threshold on the point estimate. The interval does not rule out no benefit.

Its second paragraph explains the ceiling:

The plain arm caught more than 2/3 of its plant sessions (67 of 72), so, as protocol.md §10.5 states, the gate could not be met whatever the trust arm did: 1.5 × 2S/3 = S, and no arm can catch more than S. The interval is narrow because 11 of the 12 pairs tie at 6 of 6 in both arms (see Pairs); its upper end of 1.00 reflects that ceiling, not evidence about a benefit on harder changes.

E3: review sessions that caught the planted widening 72 sessions per arm. Ratio 0.99, 95% interval [0.95, 1.00]. D0's threshold is 1.5x. Result: not met.
Trust diff 66/72 Plain diff 67/72 Ratio, trust diff over plain diff 00.20.40.60.811.21.41.6 out ofreach 1.5x 0.99

Focus or point at a mark for its numbers. The shaded band is out of reach: with the plain arm at 67 of 72, the trust arm could not exceed 1.07x.

E3 numbers, from trials/e3-pilot/result.json
ArmCaughtSessions
With the trust diff6672
With the plain diff6772
Ratio and 95% interval0.99 [0.95, 1.00], threshold 1.5x

The reviewers were models only, claude-opus-5-5 and gpt-6.1-sol, on small single-file changes. The pilot did not test changes too large to read in full, or human reviewers.

Evidence · E1, the learning cost

Parity with Rust, not a benefit.

The E1 gate gave one writer model, claude-opus-5-5, the same 30 tasks twice in Tide and twice in Rust, 60 trials per language. In the report's words, "Tide stayed within the protocol's margins rather than beating Rust".

E1 measures, with the report's ratios
MeasureTideRustRatioThreshold
First check passed56 of 6059 of 600.949153at least 0.8
Final pass58 of 6058 of 601at least 1
Check or test runs, passing trials86591.457627at most 1.5

The information-only 95% interval for the iteration ratio, 1.285714 to 1.637931, crosses 1.5. Both arms worked near ceiling on small single-file tasks, with one writer model.

Evidence · costs and case studies

Benchmarks show ties and losses. Admission caught none of the case-study bugs.

The benchmark note measures four small programs in Tide and in plain Rust on one machine. Almost no series met its stability criterion, so its medians and ratios are descriptive, not settled. In its words, "Every comparison above is a loss for Tide or a tie. None is a win." Among them, a cold debug build takes 3.8 to 4.6 times plain Rust's, and the tasks program runs 2.29 times plain Rust's release build. A rebuild after a one-line edit takes 5.2 to 6.3 times Rust's incremental rebuild, since the driver rebuilds from scratch.

Benchmarks: Tide's time as a multiple of Rust's Every series is unstable: 0 of 60 series in the main run met the benchmark tool's stability criterion, with CVs from 1.04% to 46.7%. These are descriptive medians, not settled measurements. Above 1x, Tide is slower. A row is a loss when Tide was slower in at least 20 of the paired rounds, as the note reads them.
Release run,against Rust with Tide's flags Every series unstable:medians are descriptive contracts 0.99x tie files 1.04x loss tasks 1.31x loss tcp 1.18x loss 0x0.5x1x1.5x

Against plain rust-release, tasks is 2.29x. Tide's flags alone cost 1.74x (the note, §1.1).

Cold debug build,against Rust's Every series unstable:medians are descriptive contracts 4.60x loss files 3.93x loss tasks 3.82x loss tcp 4.43x loss 0x2x4x6x

Focus or point at a row for its medians, its paired rounds and its CVs.

Benchmark medians, from the main run's records (see the note)
ComparisonProgramTide (s)Rust (s)RatioTide slowerCV, Tide and Rust
Release run, against Rust with Tide's flags (tide-release against rust-release-tide-flags) contracts 0.901369 0.905908 0.99x, tie 11 of 30 2.52%, 1.22%
Release run, against Rust with Tide's flags (tide-release against rust-release-tide-flags) files 1.124302 1.08105 1.04x, loss 26 of 30 3.97%, 4.56%
Release run, against Rust with Tide's flags (tide-release against rust-release-tide-flags) tasks 1.270912 0.967224 1.31x, loss 30 of 30 4.32%, 4.30%
Release run, against Rust with Tide's flags (tide-release against rust-release-tide-flags) tcp 1.161214 0.986425 1.18x, loss 30 of 30 3.16%, 2.86%
Cold debug build, against Rust's (tide-debug against rust-debug) contracts 0.680578 0.147812 4.60x, loss 30 of 30 6.20%, 18.2%
Cold debug build, against Rust's (tide-debug against rust-debug) files 0.699527 0.17821 3.93x, loss 30 of 30 1.78%, 4.76%
Cold debug build, against Rust's (tide-debug against rust-debug) tasks 0.838594 0.219311 3.82x, loss 30 of 30 2.59%, 7.83%
Cold debug build, against Rust's (tide-debug against rust-debug) tcp 0.794621 0.179205 4.43x, loss 30 of 30 1.04%, 2.79%

The case studies rewrite real bug reports in Tide, and admission catches none of them. In Eon's discovery race, discovery fails when a host exits between its record read and its socket check. Admission would not reject it, Tide does not find it unaided, and Eon's fix already landed with its own deterministic test. A #[sim_test] written to state the property fails on 13 of 100 seeds and passes on the fix, and the runner reruns each failing seed and checks that its trace is identical. Tide's gain is narrower than finding the bug. The seed finds the interleaving, where Eon's test needed a hook written into discovery to place the exit by hand. In Eon's slow close, a request loop blocked behind a slow close is ordinary Tide. A #[sim_test] fails on the buggy loop and passes on the fix, in virtual time and deterministically. Rust can write the same test. In hyper's ambient runtime, no admission code catches either reported failure. What Tide gives is the fix's shape, a pool that spawns only in a scope and reads time only from a Clock it is handed.

How Tide is built

AI-welcome, because it is checkable.

Tide complements Rust. Every Tide program is a valid Rust 2024 crate compiled by an unmodified rustc, and Tide's memory safety is Rust's. It is a restricted subset with its own standard library, not a fork or a replacement.

Tide's code, its design text and its paper were produced by AI agents, mainly Claude Opus and GPT Sol, with some earlier production code by Claude Fable. Tide is AI-led and human-steered. The agents made the other technical choices and reviewed and validated each change, and the owner set scope, priorities and direction and made the owner calls. A change lands only after an AI supervisor pass, normally a Codex pass and then an Opus review, and is backed by proof that can be rerun: a demo, a conformance corpus and trial reports, the negative one included.

Read further

Every number here comes from a report.

How Tide works walks through each feature with commands you can run, and Hard questions answers the usual objections.