Expand description
A container agent’s provider session files, reached through its container
(SPEC_HISTORY_COMPACT_FORM_ONLY_2026_11_23.md section 5.4).
The provider’s home in a container is the per-agent volume at CONTAINER_CLAUDE_DIR. A session is two paths in
it, named from the project folder and the session id alone: projects/<project>/<sid>.jsonl and
projects/<project>/<sid>/. Nothing here lists a folder or names anything else.
- Reading is the archive API (
docker cp), which works on a running and on a stopped container. - Removing is
rmthrough an exec when the container runs; when it is stopped, a short helper container of the same image that mounts only the agent’s volume, has no network and no capability but the onermneeds, and is removed when it ends.
Structs§
- Session
Paths - The two paths of one session in the container.
Constants§
- HELPER_
LABEL - The label every helper container carries, so a leftover can be found.
Functions§
- extract
- Unpack the archive of one path of a session (what
docker cpgives) intodest.topis the one name the archive may hold at its root (<sid>.jsonlor<sid>). Only regular files and folders, only undertop: a link, a device, a name that climbs out or a second root is an error and leaves nothing to trust. Returns how many bytes it wrote. - helper_
config - The helper container’s configuration. Pure, so the locks are testable without a runtime.
- remove_
argv - The removal as an argv, run directly (no shell): exactly the two paths, the folder with what is under it.
- session_
paths Noneunless both names are plain: nothing is ever named from a string with a separator in it.- valid_
project - A project folder name: one plain path part, as the provider names it (the working folder with its separators
turned into
-).