Rename a resumed session's husk with an 'X ' prefix

This commit is contained in:
Lilleman auf Larv
2026-09-04 10:54:04 +02:00
parent 673632ff21
commit 9a59c8cb50
3 changed files with 91 additions and 2 deletions
+7
View File
@@ -62,6 +62,12 @@ runs `claude stop <old id>` after a successful resume. Without that the husk
would be picked up again on a later tick and resumed into a *second* session
working the same conversation — two agents racing on the same git worktree.
A stopped husk is still listed, under the same name as the successor that
replaced it, which is confusing to work next to. So the watchdog also prefixes
it — `X rewrite larvitsmpp typescript esm` — by rewriting `name` in the husk's
`state.json`, which is where `claude agents` reads it and which no command sets.
`--superseded-prefix` changes it.
### Host headroom
A resume starts a fresh process that reloads a whole conversation, so before
@@ -190,6 +196,7 @@ hardcoded. To make one permanent, add it to the crontab line.
| `--max-swap-used-pct` | `WATCHDOG_MAX_SWAP_USED_PCT` | `50` |
| `--min-available-mb` | `WATCHDOG_MIN_AVAILABLE_MB` | `2048` |
| `--prompt` | `WATCHDOG_PROMPT` | see `--help` |
| `--superseded-prefix` | `WATCHDOG_SUPERSEDED_PREFIX` | `X ` |
| `--dry-run` | — | off |
## Files