# the foundation

A **worker** is you or an agent in a Git worktree. A **session** is the running apps and resource access antil remembers for that worktree, even when the agent leaves.

Tunnels, chambers, and seals need the same answer to a basic question: what is really running, and what can happen next?

*The nest keeps its state when a worker leaves.*

*An agent requests work. antil keeps the request and result. A replacement agent reads the state; unknown outcomes require inspection before explicit retry.*

## an agent can arrive halfway through

The catalog agent starts the shop, then loses its conversation. The next agent reads `status --json` in the same worktree. It sees the apps, addresses, data references, known problems, and concrete next commands. It does not need the first agent's terminal history or a different API for every harness.

## a lost response does not start the work again

antil records requests before acting on them. Retrying the same request key returns that request. If a daemon restarts while a shop app is running, antil checks the existing worker rather than launching a duplicate app.

If a migration or test might already have run, antil keeps that uncertainty visible. It never automatically repeats arbitrary work whose outcome it cannot establish. The agent must inspect it and choose an explicit next step. Crash-safe does not mean every external command can be undone.

## the boundary is explicit

antil coordinates work launched through its CLI. A command run directly in a terminal can still modify a database. It cannot protect shared data from tools that bypass it. Ending a worker keeps its data until you explicitly delete it.

This foundation supports local tunnels and Postgres chambers today; [seals](/docs/seals/) are coming. [Use antil from an agent](/docs/for-agents/).
