|
|
|
@@ -35,7 +35,7 @@ Before doing anything, verify the environment:
|
|
|
|
|
```bash
|
|
|
|
|
# 1) herdr available and isolated server status
|
|
|
|
|
command -v herdr || { echo "ERROR: herdr not installed"; exit 1; }
|
|
|
|
|
echo "Herdr server name: ${HERDR_SERVER_NAME:-default}"
|
|
|
|
|
echo "Herdr session name: ${HERDR_SESSION_NAME:-default}"
|
|
|
|
|
|
|
|
|
|
# 2) claude / agy available
|
|
|
|
|
command -v claude # required for --agent claude
|
|
|
|
@@ -91,15 +91,50 @@ Under the hood this now maps to a real, separate herdr **session** (`herdr --ses
|
|
|
|
|
|
|
|
|
|
### Recommended Alias
|
|
|
|
|
You can set an alias in your shell to easily query sessions on the isolated server:
|
|
|
|
|
To prevent this, you can run this skill inside an **isolated herdr session** using the `HERDR_SESSION_NAME` environment variable or the `--herdr-session <name>` flag (opt-in).
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
alias tmc='herdr -L multi-agent-canary'
|
|
|
|
|
tmc ls # Lists only your multi-agent sessions
|
|
|
|
|
# Explicit custom session
|
|
|
|
|
export HERDR_SESSION_NAME=multi-agent-canary
|
|
|
|
|
bash .agents/skills/multi-agent-mux-create/scripts/create_session.sh \
|
|
|
|
|
--workspace /path/to/project --agent claude --role Developer
|
|
|
|
|
|
|
|
|
|
# Or via flag
|
|
|
|
|
bash .agents/skills/multi-agent-mux-create/scripts/create_session.sh \
|
|
|
|
|
--workspace /path/to/project --agent claude --role Developer --herdr-session multi-agent-canary
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Safety Rules (Pitfall 29 Summary)
|
|
|
|
|
- Never use global server termination commands like `herdr server stop` as they will destroy every workspace/agent on that server (including your own workspace sessions if they share the server). (`kill-server`/`kill-session -a` are tmux-era names that don't exist in herdr's real CLI — see Pitfalls below.)
|
|
|
|
|
- By using an isolated server via `HERDR_SERVER_NAME`, your agent sessions are completely separated from your default user workspace, ensuring 0% interference — this is now 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_SERVER_NAME>` followed by `herdr session delete <HERDR_SERVER_NAME>` — this only affects that named session, never the default one.
|
|
|
|
|
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`, your agent sessions are completely separated from your default user workspace, ensuring 0% interference — this is now 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.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Output format
|
|
|
|
|
|
|
|
|
|
When invoked, the script creates or updates `./.mam/agent-sessions.yaml` with:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
herdr_sessions:
|
|
|
|
|
- name: <workspace>-creator-<agent> # E.g. landing-page-creator-claude
|
|
|
|
|
status: running # Initial status for a freshly created agent
|
|
|
|
|
role: Developer
|
|
|
|
|
herdr_session_created_at: '2026-08-04T12:00:00Z'
|
|
|
|
|
herdr_session_epoch: 1785844800
|
|
|
|
|
herdr_session: <HERDR_SESSION_NAME> # Isolated session name (default: 'mam-<ws-slug>')
|
|
|
|
|
delegate_job_id: null
|
|
|
|
|
pane:
|
|
|
|
|
index: 0
|
|
|
|
|
pid: 12345
|
|
|
|
|
cmd: claude
|
|
|
|
|
cmd_full: claude --dangerously-skip-permissions
|
|
|
|
|
cwd: /path/to/project
|
|
|
|
|
start_command: "HERDR_SESSION_NAME=<herdr_session> herdr new-session -d -s <SESSION_NAME> -x 140 -y 40 -c <WORKSPACE> <CMD_FULL>"
|
|
|
|
|
attach_command: "HERDR_SESSION_NAME=<herdr_session> herdr agent attach <SESSION_NAME>"
|
|
|
|
|
kill_command: "HERDR_SESSION_NAME=<herdr_session> herdr kill-session -t <SESSION_NAME>"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Workflow
|
|
|
|
|
|
|
|
|
|