fix: hivectl choom passes the harness --settings/--mcp-config/--system-prompt-file so claude gets settings + tools + persona

This commit is contained in:
damocles 2026-06-05 22:16:00 +02:00 committed by mara
commit 07e8f442cb
3 changed files with 64 additions and 28 deletions

View file

@ -281,7 +281,7 @@ Open 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 — drops the operator straight into the agent's live Claude session with its full loaded context and persona. Requires root (same as all machinectl shell operations) and the container must be running.
The session is entered **as the agent user** (not root): claude reads its OAuth credentials + settings from the agent's `/home/<name>/.claude`, and the working directory is set to the agent's state dir (`/agents/<name>/state`) so `--continue` resumes the same per-project session the harness runs. Entering as root (the `machinectl shell` default) is what loses both.
To match the harness exactly, choom enters **as the agent user** (not root) so claude reads the OAuth credentials from the agent's `/home/<name>/.claude`; runs from the agent's state dir (`/agents/<name>/state`) so `--continue` resumes the right per-project session and `CLAUDE.md` loads; and passes the same `--settings` / `--mcp-config` / `--system-prompt-file` the harness writes to `/run/hive-config/` (settings, MCP tools, role prompt). Entering as root (the `machinectl shell` default) loses all of it.
Pass `--fresh` to start a new Claude session instead of continuing the most recent one.