refactor: retire agent-name.sh for the composed session name #1059

Merged
coilysiren merged 1 commit from aos/claude/uz86 into main 2026-08-14 07:43:00 +00:00
Owner

Closes the naming half of agent-compose#279: every surface that named an agent derived the name itself, and none of them could know the composed seat.

What changed

acompose whoami (agent-compose, already landed) is now the only answer to what a session is called. docker/dev-base/session-name.sh is the SessionStart banner that reads it.

One file, not two. The retired script existed as a host copy and a container copy that docs/dev-base-self-name.md explicitly required to stay "format-identical", with a named drift hazard. That section is gone because the hazard is: the host installer and the image now wire the same file.

Silence rather than a guess. With no projection there is no composed name and the hook prints nothing. The old script always produced one, so a reader could never tell a real identity from a fabricated one.

The installer repoints, it does not skip. The old merge returned "no change" when it found an agent-name.sh hook. After a rename that would leave a deleted script registered on every already-converged host, so install-session-name.py rewrites it.

Two things carried along that are not naming

  • gitidentitydocker/dev-base/git-identity.sh. It backfills git user.name/user.email from the WARD_GIT_* seam and shared a file with naming only because both ran at SessionStart. Tests moved with it, unchanged in substance.
  • Container name → statusline.d/20-container.sh. Worth a look: it was already not rendering. Both statusLine surfaces point at the provider composer, no provider emitted WARD_CONTAINER_NAME, and the two tests asserting it were green against the dead agent-name.sh statusline mode. It is a row now rather than a suffix, since the composer's model is rows. Say the word if you would rather it stay gone.

Verification

  • 501 tests pass. The 11 test_aosguard.py errors and the ruamel collection error are pre-existing in this environment - confirmed by re-running with these changes stashed.
  • pre-commit run --all-files clean.

Ordering

ansible/roles/claude-hooks invokes the installer by filename, so the matching infrastructure PR must land after this one or a converge run finds a missing script.

Closes the naming half of `agent-compose#279`: every surface that named an agent derived the name itself, and none of them could know the composed seat. ## What changed `acompose whoami` (agent-compose, already landed) is now the only answer to what a session is called. `docker/dev-base/session-name.sh` is the SessionStart banner that reads it. **One file, not two.** The retired script existed as a host copy and a container copy that `docs/dev-base-self-name.md` explicitly required to stay "format-identical", with a named drift hazard. That section is gone because the hazard is: the host installer and the image now wire the same file. **Silence rather than a guess.** With no projection there is no composed name and the hook prints nothing. The old script always produced one, so a reader could never tell a real identity from a fabricated one. **The installer repoints, it does not skip.** The old merge returned "no change" when it found an `agent-name.sh` hook. After a rename that would leave a deleted script registered on every already-converged host, so `install-session-name.py` rewrites it. ## Two things carried along that are not naming * **`gitidentity` → `docker/dev-base/git-identity.sh`.** It backfills git `user.name`/`user.email` from the `WARD_GIT_*` seam and shared a file with naming only because both ran at SessionStart. Tests moved with it, unchanged in substance. * **Container name → `statusline.d/20-container.sh`.** Worth a look: it was **already not rendering**. Both statusLine surfaces point at the provider composer, no provider emitted `WARD_CONTAINER_NAME`, and the two tests asserting it were green against the dead `agent-name.sh statusline` mode. It is a row now rather than a suffix, since the composer's model is rows. Say the word if you would rather it stay gone. ## Verification * 501 tests pass. The 11 `test_aosguard.py` errors and the `ruamel` collection error are pre-existing in this environment - confirmed by re-running with these changes stashed. * `pre-commit run --all-files` clean. ## Ordering `ansible/roles/claude-hooks` invokes the installer by filename, so the matching infrastructure PR must land **after** this one or a converge run finds a missing script.
refactor: retire agent-name.sh for the composed session name
All checks were successful
ci / ward-doctor (pull_request) Successful in 17s
ci / aos-cli-tests (pull_request) Successful in 38s
ci / gate (pull_request) Successful in 1m43s
dev-base-pr / build (pull_request) Successful in 9m20s
7dbd833af2
Every surface that named an agent derived the name itself: harness, OS,
hostname, and a tag sliced out of the raw session UUID. That could not know
the composed seat, so an agent introduced itself as one thing while its
status line said another, and the tag used the full alphabet rather than the
dictatable one, so it was not reliably speakable.

Agent Compose now answers that question, so nothing else has to.

* `docker/dev-base/session-name.sh` is the SessionStart banner. It calls
  `acompose whoami` and prints nothing when there is no projection or no
  acompose on PATH - silence rather than a fabricated name.
* ONE file, wired by both the host installer and the image. The retired
  script existed as a host copy and a container copy that a doc section
  explicitly required to stay "format-identical", with a named drift hazard.
  That section is gone because the hazard is.
* `install-session-name.py` REPOINTS a SessionStart hook still wired to
  agent-name.sh rather than skipping it, which the old merge did. Skipping
  would leave a deleted script registered on every already-converged host.

Two things carried by agent-name.sh that are not naming, preserved:

* `gitidentity` moves to `docker/dev-base/git-identity.sh`. It backfills
  git user.name/email from the WARD_GIT_* seam and shared a file with naming
  only because both ran at SessionStart. Its tests move with it.
* The warded container name moves to a `20-container.sh` status-line
  provider. Worth knowing: it was ALREADY not rendering. Both statusLine
  surfaces point at the provider composer, no provider emitted
  WARD_CONTAINER_NAME, and the tests asserting it were green against the
  dead `agent-name.sh statusline` mode. It is a row now rather than a
  suffix, since the composer's model is rows.

Docs updated across dev-base-self-name, statusline, dev-base-git-identity,
repo-layout, install, features-agents-sessions, and README.

The claude-hooks ansible role invokes the installer by name, so
infrastructure needs the matching rename before a converge run finds it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
coilysiren deleted branch aos/claude/uz86 2026-08-14 07:43:00 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agentic-os!1059
No description provided.