Session Management
This page explains how to create, resume, keep, and clean up container sessions. A session is one container plus the agent's working state and conversation history inside it.
Put run profiles in
runs.<name>of~/.manyoyo/manyoyo.json; use absolute paths forenvFileand an object forenv.
Create a Session
# Named session (recommended, easy to resume)
manyoyo run -n my-project -y c
# Without a name, one is generated as my-{MMDD}-{HHmm}; see it with manyoyo ps
manyoyo run -y c
# Fix name and options with a run profile
manyoyo run -r project-a{
"runs": {
"project-a": {
"containerName": "my-project-a",
"hostPath": "/abs/path/project-a",
"envFile": ["/abs/path/anthropic_claudecode.env"],
"yolo": "c"
}
}
}containerName supports the {now} template (expands to YYYYMMDD-HHmmss, e.g. 20261024-230915).
Choices on Exit
After the agent exits, MANYOYO asks whether to keep the container:
| Option | Effect |
|---|---|
y (default) | Keep the container in the background to resume later |
n | Delete the container; data and history are lost |
1 | Re-enter with the first command (container label manyoyo.default_cmd) |
r | Append the resume argument to the first command (only shown when it is an agent) |
x | Enter and run a new command |
i | Open an interactive shell |
To hide the prompt use the -q quiet items (see CLI Options); for one-off tasks use --rm-on-exit to delete on exit:
manyoyo run -n temp --rm-on-exit -y cResume a Session
While the container exists, re-enter it by name; arguments after -- are appended to the first command:
manyoyo run -n my-project # run the first command again
manyoyo run -n my-project -- -r # Claude / Gemini resume
manyoyo run -n my-project -- resume # Codex resume
manyoyo run -n my-project -- -c # OpenCode resumeResume arguments follow lib/agent-resume.js: Claude/Gemini -> -r, Codex -> resume, OpenCode -> -c. The terminal hint after startup also prints the resume command for the current container. For more resume options see each agent's own --help.
What Persists
- While the container exists: filesystem, environment variables, and agent history stay in the container;
manyoyo rmremoves all of it. - Working directory: the current directory is mounted by default; use
--hpfor another one. Code changes live on the host. - Extra data: mount with
-vorvolumes; named volumes survive container deletion. - Conversation history: stored inside the container (for example
~/.claude,~/.codex). To keep it after deleting the container, mount that directory; for the risk of mounting host credentials or config directories see Security Notes.
manyoyo run -n my-project -v "myproject-data:/workspace/data" -y cMultiple Sessions
Each session has its own filesystem, environment, history, and processes. Use one per project:
manyoyo run -n project-a --hp ~/projects/a -y c
manyoyo run -n project-b --hp ~/projects/b -y c
manyoyo ps # list all sessions
manyoyo run -n project-a -- -r # back to A (Claude)Inspect and Enter
manyoyo ps # list sessions
manyoyo run -n my-project -x /bin/bash # enter a running container
docker logs --tail 100 my-project # container logs (same for Podman)Clean Up
Run manyoyo ps to confirm the name, then delete one by one. Avoid prefix-matching batch commands, which can remove unrelated containers:
manyoyo ps
manyoyo rm <name>Backup and Snapshot
docker cp my-project:/root/.claude ./claude-backup # back up agent history
docker commit my-project my-project:snapshot # save current state as an imageSnapshot images are not managed by manyoyo; list them with manyoyo images and remove them when no longer needed.
Troubleshooting
- Container does not exist: confirm the name with
manyoyo ps; if deleted, runmanyoyo run -n <name> -y cagain. - Agent forgets earlier conversation: the container may be new, or the history directory was not mounted; see What Persists.
- Container fails to start: check
docker logs <name>, and if neededmanyoyo rm <name>then recreate; for runtime problems see Runtime Errors.