fix(issue-45): MAM herdr servers start with restore-on-restart off; resume closes its own restored empty shell (v4.8.5) #48

Merged
Godopu merged 14 commits from fix/issue-45 into main 2026-10-05 09:56:40 +00:00
3 changed files with 14 additions and 12 deletions
Showing only changes of commit feceddf49f - Show all commits

No files matched your search

@@ -117,6 +117,8 @@ Why use `--herdr-session`?
- By default, all skills target `default` herdr session socket — fine for single-workspace use.
- By using an isolated session via `HERDR_SESSION_NAME` (or `--herdr-session`), your agent sessions are completely separated from your default user workspace, ensuring 0% interference — this is backed by a genuinely separate `herdr` session/socket, not merely a workspace label.
- To deliberately tear down an *entire* isolated group at once (all its workspaces and agents), use `herdr session stop <HERDR_SESSION_NAME>` followed by `herdr session delete <HERDR_SESSION_NAME>` — this only affects that named session, never the default one.
- An isolated server MAM starts does not relaunch saved agents when it restarts (#45): it runs with `HERDR_CONFIG_PATH=<your herdr config dir>/mam-server-config.toml`, your herdr config with `[session] resume_agents_on_restore = false`. Its saved panes come back as empty shells; resume closes the one of the session it resumes.
- That file is rebuilt each time MAM starts the server, so a change to your herdr config reaches a MAM server only when it is next started; `herdr server reload-config` rereads the generated file. A server you start yourself (`herdr session attach`) does not get it.
---
@@ -60,7 +60,7 @@ If both are empty → for Class A agents (`agy`, `hermes`, `opencode`, `codex`),
bash .agents/skills/multi-agent-mux-resume/scripts/resume_session.sh --workspace <path> --agent <agent> --session <name>
```
`resume_session.sh` does the whole flow: original-cwd check, control-plane binding, session-id resolution (`resolve_session_id.sh`), the herdr-alive check, the agent command (adapter `resume-spec`, or `spawn-spec` for a Class A fresh spawn), spawn, start-up dialogs, and the YAML update (`update_yaml_resumed.sh`, which also publishes a `progress "resumed"` event when the row has a `delegate_job_id`). It never attaches; attaching is a separate step that names the server, because the server the script exports does not reach the calling shell and the native `herdr` binary does not route on environment variables: `herdr --session <server> agent attach <name>` (`<server>` = the `--herdr-session` you passed, or the row's `herdr_session`).
`resume_session.sh` does the whole flow: original-cwd check, control-plane binding, session-id resolution (`resolve_session_id.sh`), the herdr-alive check, the agent command (adapter `resume-spec`, or `spawn-spec` for a Class A fresh spawn), spawn (just before it, the session's own empty shell left by a server restart is closed: same session id, no agent, nothing running; `lib_py/herdr_restore.py`), start-up dialogs, and the YAML update (`update_yaml_resumed.sh`, which also publishes a `progress "resumed"` event when the row has a `delegate_job_id`). It never attaches; attaching is a separate step that names the server, because the server the script exports does not reach the calling shell and the native `herdr` binary does not route on environment variables: `herdr --session <server> agent attach <name>` (`<server>` = the `--herdr-session` you passed, or the row's `herdr_session`).
| Option | Meaning |
|---|---|
+11 -11
View File
@@ -60,8 +60,8 @@
},
{
"skill": "multi-agent-mux-create",
"start": 127,
"end": 145,
"start": 129,
"end": 147,
"lang": "yaml",
"sha": "2dd608d04ae0",
"class": "c",
@@ -74,8 +74,8 @@
},
{
"skill": "multi-agent-mux-create",
"start": 151,
"end": 153,
"start": 153,
"end": 155,
"lang": "bash",
"sha": "613003708f19",
"class": "c",
@@ -88,8 +88,8 @@
},
{
"skill": "multi-agent-mux-create",
"start": 191,
"end": 195,
"start": 193,
"end": 197,
"lang": "bash",
"sha": "38836d31bf38",
"class": "c",
@@ -103,8 +103,8 @@
},
{
"skill": "multi-agent-mux-create",
"start": 217,
"end": 239,
"start": 219,
"end": 241,
"lang": "bash",
"sha": "d90cfd2555fd",
"class": "b",
@@ -478,9 +478,9 @@
"multi-agent-mux-resume/scripts/resume_session.sh:133-144",
"multi-agent-mux-resume/scripts/resume_session.sh:147-158",
"multi-agent-mux-resume/scripts/resume_session.sh:172-197",
"multi-agent-mux-resume/scripts/resume_session.sh:237",
"multi-agent-mux-resume/scripts/resume_session.sh:241",
"multi-agent-mux-resume/scripts/resume_session.sh:247-250",
"multi-agent-mux-resume/scripts/resume_session.sh:245",
"multi-agent-mux-resume/scripts/resume_session.sh:249",
"multi-agent-mux-resume/scripts/resume_session.sh:255-258",
"lib_py/agents/adapters/claude.py:109"
],
"mismatch": [