Documentation
Using the Strentis stack
What each product does, how to get it running, and what changed between versions. Both products are in private alpha.
Runs Claude Code, Codex, or any coding agent inside a kernel-enforced boundary. Anything beyond the session's granted scope needs your approval.
Read the docs →States what counts as "done" before an agent starts, then returns
fulfilled or breached from real evidence.
Requirements
- Linux, including WSL2, on x86_64.
- A kernel with Landlock (5.13+) and bubblewrap on
PATH(apt install bubblewrap). claudeand/orcodexinstalled, for whichever agents you plan to run.- agent-contract additionally needs agent-immune installed. It has no enforcement of its own.
On native Ubuntu 24.04+, AppArmor may block the unprivileged user namespaces bubblewrap needs.
agent-immune doctor will tell you if that's the case.
Layer 1 — Authority
agent-immune
What it does
You decide what a coding agent may touch. agent-immune enforces it at the operating-system level, so the agent can't talk its way past the boundary. For every session it launches, and everything that session starts:
- Writes land only inside the directories you granted.
- Credentials on disk (
~/.ssh,~/.aws, cloud and registry tokens, your host Claude/Codex login) are hidden, and only an allowlist of environment variables passes through. - Host services such as Docker and D-Bus, and socket files, are out of reach.
- Network is HTTPS to approved destinations only. Each session starts with just its own model API.
- Your real credentials stay outside the sandbox. A broker injects them, so the agent only ever holds a placeholder.
- Labelled data narrows where a session that read it may send anything.
- Files written by a narrower session can't silently be run by a broader one without your approval.
- Quarantine stops a session and its whole tree of descendants in one command. Other sessions keep working.
Install
Alpha builds are shared directly with testers. To request one, email
strentis.ai@gmail.com. Unpack the release and run its installer.
It needs no root and installs into ~/.local.
# from the unpacked release directory $ ./install.sh $ agent-immune doctor # exercises every mandatory protection on this machine
doctor actually tests each protection rather than checking that binaries exist.
If a mandatory check fails, agent-immune run refuses to launch. There is no unprotected fallback mode.
To remove it, run ./uninstall.sh. Your projects and their state are left untouched.
Quickstart
# 1. register the project (writes agent-immune.json, no secrets) $ cd ~/my-project $ agent-immune init . # 2. run agents, each with a narrow write scope $ agent-immune run --session frontend --write ./frontend -- claude $ agent-immune run --session backend --write ./backend -- codex # 3. see what's running and with what authority $ agent-immune graph # 4. if a session goes bad $ agent-immune quarantine backend → that session, and every descendant, stopped. Every other session untouched.
init also sets the project's authority ceiling: the most any session in it
could ever be granted, no matter what is approved later.
Approvals
When an agent hits a boundary, it can file a request explaining what it needs. A request carries no authority by itself. Nothing changes until you decide.
$ agent-immune intake # pick up new requests $ agent-immune pending # everything waiting for you, of every kind $ agent-immune show <id> $ agent-immune approve <id> # or: agent-immune deny <id> "reason"
The kinds of request you'll see:
- A one-off change. Approval issues a single-use work order. The agent works in a private staging copy, and only the exact effect you approved reaches your project.
- A wider scope going forward. The running process never gains it. The next run of the same session does
(
run --session frontend --existing -- claude). - Trust in another agent's file. This is bound to that file's exact contents and to one consuming session. Editing one byte requires a fresh approval.
- A new network destination or operation. These take effect immediately.
Inside a session, agent-immune why explains what was refused and what to request.
If you edit an agent-produced file yourself, run agent-immune provenance clear <path> so sessions accept your edit.
Network & credentials
Each session has its own empty network. Its only way out is HTTPS through its own gateway, to destinations you approved. Private and local addresses are always refused.
# grant a destination at launch $ agent-immune run --session docs --write ./docs --allow-net pypi.org:443 -- claude # set up credential brokering once $ agent-immune broker status $ agent-immune broker set-credential anthropic # paste a token from `claude setup-token` # optional: let an agent push to one GitHub repo $ agent-immune run --session release --write . \ --allow-op 'github-git:POST:/you/repo*/git-receive-pack' -- claude
Codex only needs you to be logged in (codex login). The broker keeps its login current.
Labelled data
Mark sensitive data and agent-immune follows it. A session that reads labelled data, directly, through a copy, or through anything a tainted session wrote, is narrowed before it sees a byte. From then on it may reach only its model API and destinations you approved for labelled data.
$ agent-immune label confidential ./data
$ agent-immune label allow internal-api.example.com:443
$ agent-immune labels # what's labelled, and who may receive it
Command reference
| Command | What it does |
|---|---|
doctor | Check this machine can enforce every mandatory protection |
init . | Register a project and its authority ceiling |
run --session S --write DIR -- CMD | Launch an agent in a confined session |
run --session S --existing -- CMD | Relaunch the same session with its current authority |
pending · show · approve · deny | Review and decide on requests |
graph | Live tree of sessions, their authority and status |
audit | Full decision log |
quarantine S | Stop a session tree and revoke its authority |
why | Inside a session: explain recent refusals |
broker status · broker set-credential | Manage brokered credentials |
label · labels | Mark data and approve where it may go |
provenance stale · provenance clear | Accept your own edits to agent-produced files |
Limits
Plan for these before running an agent unattended:
- Content isn't inspected. agent-immune controls where data can go, not what it is. Anything a session can read can be sent to its model API or a destination you approved.
- HTTPS only. Raw TCP, ssh and plain HTTP are refused, so git-over-ssh won't work inside a session.
- Unusual credential locations, such as a
.envin the project, aren't hidden automatically. Add them tomasked_paths_extrainagent-immune.jsonbefore the first session. - Overhead: roughly half a second per launch, plus some cost for very syscall-heavy workloads.
- Only processes launched through agent-immune are confined.
Each release ships a KNOWN_LIMITATIONS.md with the full, measured list.
Layer 2 — Obligation
agent-contract
What it does
Before a hired agent starts, you state exactly what counts as done. After it finishes, agent-contract checks that against real evidence: files on disk, real exit codes, and agent-immune's own audit trail. The agent never grades its own work. A contract can require:
- A write scope: where the agent may work.
- A deadline. Overrunning it is a breach, and the session is quarantined.
- A deliverable that must exist and match a JSON schema.
- A verify script that checks the result is actually correct, not just well-shaped. It runs in its own, narrower agent-immune session.
agent-contract never grants or widens authority. Every action goes through the installed agent-immune command.
Install
# agent-immune must already be installed and passing `agent-immune doctor`
$ ./install.sh
The installer also copies a small worked example, sum_numbers, into
~/.local/share/agent-contract/.
Quickstart
# 1. state what "done" means $ agent-contract propose --hirer orchestrator --hired worker \ --write ./work --deadline 600 \ --deliverable ./work/report.json --schema ./example/report.schema.json \ --verify-script ./example/verify.py --verify-deliverable ./work/report.json \ --verify-write ./verify_scratch \ --reason "sum the numbers in example/numbers.txt" → proposed contract <id> # 2. hire the agent, exactly as you'd run it yourself $ agent-contract run <id> -- claude -p "..." → status=needs_trust # 3. a human lets the verifier read the deliverable $ agent-immune intake $ agent-immune approve-trust <id-shown> $ agent-contract verify <id> → status=fulfilled
agent-contract show <id> gives the clause-by-clause verdict, list shows every contract in the project,
and audit shows the contract audit trail. agent-contract --help documents every flag.
Have your verify scripts print why they failed. That reason appears directly in show.
Verdicts
| Status | Exit | Meaning |
|---|---|---|
fulfilled | 0 | Every clause passed on real evidence. |
breached | 2 | A clause failed. The output names the first failing clause and its evidence. |
needs_trust | 3 | A normal pending step, not a failure: the verifier needs a human trust grant. The output gives the exact commands to run next. |
Limits
- No subjective clauses. If it can't be checked mechanically or by a script, it can't be in a contract yet.
- Final state only. A deliverable fixed before the agent exits looks the same as one that was right first time.
- No partial credit. A contract is fulfilled or breached, never a score.
- Codex is slower than Claude on identical tasks. Budget 15–20+ minute deadlines for Codex-driven contracts.
Versions
What's in each version
What agent-immune enforces in the current release, and what the version in development adds.
| Protection | v0.2.0 · current | v0.3 · in development |
|---|---|---|
| Writes confined to the granted scope | ✓ | ✓ |
| Human approval for anything wider | ✓ | ✓ |
| Agent-produced files gated by provenance | ✓ | ✓ |
| One-command quarantine of a session tree | ✓ | ✓ |
| Credentials on disk and in the environment hidden | ✓ | ✓ |
| Host services and sockets hidden | ✓ | ✓ |
| Network: HTTPS to approved destinations only | ✓ | ✓ |
| Credential broker (agents hold placeholders) | ✓ | ✓ |
| Labelled data narrows where a session can send | ✓ one label | named labels |
| Empty home directory and Windows drives by default | — | in development |
| Per-label export approval | — | in development |
| GitHub and model APIs reachable only through the broker | — | in development |
| Label changes reach running sessions | — | in development |
Release history
Tighter control over what an agent can read, and finer control over where sensitive data may go. Not yet in a release. Details may change before it ships.
- Home isolation. Sessions see an empty home directory and empty Windows drives, except the project,
toolchains, their own agent, and anything you list in
home_visible_extra. You can opt out per project withhome_isolation: false. - Named labels. For example
label customer-data ./data. A session may send only to destinations approved for every label it has read (label allow <host> --for customer-data). - Brokered or tunnelled, never both. Hosts with a broker adapter, such as GitHub and model APIs, are reachable only through the broker, where individual operations can be approved.
- Live labels. Labelling or unlabelling data applies to running sessions immediately. A tainted session's new files are labelled as they're written, so other sessions reading them at the same time are covered.
We deliberately did not build general HTTPS interception. Decrypting agent traffic would break certificate pinning and put plaintext in our custody. Operation-level control comes through broker adapters instead.
Expanded the boundary from writes to an agent's whole environment.
- Credentials on disk, inherited tokens and host services are hidden from sessions.
- Per-session network isolation: HTTPS to approved destinations only, approvable live.
- Credential broker for model APIs and approved GitHub operations. Agents never hold your real tokens.
- Labelled data, with export limited to approved destinations.
- One
approve/denyfor every kind of request, andwhyinside a session. - Quarantine now also closes a session's network tunnels.
First release. Contracts with write scope, deadline, deliverable schema and verify-script clauses, resolving to fulfilled, breached or needs_trust.
The first alpha line: kernel-enforced write confinement, human approval with single-use work orders, provenance-bound trust for agent-produced files, and session-tree quarantine. Superseded by v0.2.0. Please upgrade.