060. Caged is your agent, kept in its folder

Status: accepted 2026-10-16, built the same day.

Context

A session can run in three ways: not caged, caged (ADR-037) and sealed (ADR-045). The difference between caged and sealed was clear in the code and blurred in practice. "Caged" said "only its project", yet a caged session's cage had the owner's whole ~/.claude (or ~/.pi/agent) mounted read-write, for its conversations. With it came:

A private .claude per cage, with conversations copied in and out, was considered and rejected: two copies of a conversation, kept in step, can lose part of one when the copy fails.

Decision

One sentence each, kept true:

A caged session's harness home is private, built from what is let in. The cage's ~/.claude (or ~/.pi/agent) is a directory of the cage's own, deleted with it. Into it come:

Nothing else comes in, so whatever lands in the owner's harness directory later is out by default.

The hard line is "no other conversations"; the folder above is how that is kept, not a promise that the conversation is always the owner's own file. The two can conflict, and then isolation wins: a harness that keeps every project's conversations in ONE store cannot be given this project's without giving it all the others (OpenCode, ADR-062, is the case). There the cage gets a store of its own — never a copy kept in step, which is what the paragraph above rejects — and the session's conversation is the cage's, gone with it.

Its credentials come through the agent (ADR-059), never into the cage.

Caged stops here. Anything that needs more than this is sealed's job: no further narrowing of caged, no network limits on it.

Consequences