feat(#2067): choom uses a fresh named session, drop --fresh flag

This commit is contained in:
damocles 2026-06-27 23:06:32 +02:00 committed by mara
commit 09b83c9d1e
3 changed files with 41 additions and 114 deletions

View file

@ -123,17 +123,17 @@ reported at the end rather than aborting mid-run.
Drop into an interactive Claude session inside an agent container.
Replaces the current process with `machinectl shell <name>@h-<name>`
running `claude --continue` from the agent's state dir. Requires root
(same as all `machinectl shell` operations).
running claude from the agent's state dir. Requires root (same as all
`machinectl shell` operations).
```bash
hivectl choom iris # join iris's ongoing Claude session (--continue)
hivectl choom iris --fresh # start a new Claude session instead
hivectl choom iris # fresh Claude session named "choom" in iris's container
```
Without `--fresh`, `--continue` is passed so the operator joins the
agent's live context window. With `--fresh` a clean session starts.
The container must be running.
Each launch starts a fresh session named `choom` (claude mints its own
id), so it never collides with the harness's live session in the same
project dir. The operator can rejoin a prior choom session later with
`claude --resume choom`. The container must be running.
choom reproduces the harness's own claude invocation so the operator
lands in a faithful copy of the agent's environment:
@ -143,14 +143,13 @@ lands in a faithful copy of the agent's environment:
agent's `/home/<name>/.claude` where its OAuth credentials live. choom
prefixes the machine with `<name>@` (the meta-flake sets the agent's
unix user name to its label).
- **from `/agents/<name>/state`**: `--continue` resolves the session for
that project dir and `CLAUDE.md` (the persona) loads from the cwd.
- **from `/agents/<name>/state`**: the session and `CLAUDE.md` (the
persona) resolve against the right project dir.
- **with the harness flags**: `--settings`, `--mcp-config`, and
`--system-prompt-file` from `/run/hive-config/` — the same files the
harness writes each turn — so the operator gets the agent's settings,
the hyperhive/matrix MCP tools (which `--continue` needs to replay a
tool-using history), and the role prompt. Each flag is included only
when its file exists.
the hyperhive/matrix MCP tools, and the role prompt. Each flag is
included only when its file exists.
## Open