docs: sessions self-name — AO Master Orchestrator + per-work worker renames#32
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository’s orchestration-layer instruction set to keep ao-hosted sessions self-named (ao displayName + Claude Code title where supported), and wires the missing npm scripts used to assemble/regenerate the agent instruction files.
Changes:
- Add “Session self-naming” policy (rename on claim + on each queue transition) and document the claude-code
/renameviatmux send-keys. - Update orchestrator standing policy (orchestrator self-names at startup; fleet cap 4 → 8; reinforce worker self-rename duty in spawn prompts).
- Add
agents/agents:check/agents:systemscripts and regenerate the assembled instruction files.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds missing scripts for building/checking/system-installing assembled agent instruction files. |
| agent-instructions/source/55-extensions.md | Introduces the repo extension policy for session self-naming across surfaces. |
| agent-instructions/source/60-orchestrator.md | Updates orchestrator policy to self-name and to require worker self-rename behavior; updates fleet cap. |
| AGENTS.md | Regenerated assembled instructions (Codex identity + shared body). |
| AGENTS.shared.md | Regenerated identity-free shared-body artifact. |
| CLAUDE.md | Regenerated assembled instructions (Claude identity + shared body). |
| GEMINI.md | Regenerated assembled instructions (Gemini identity + shared body). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Orchestration-layer change only (vanilla rule: no ao source touched). - Repo extensions: new "Session self-naming" rules for ao-hosted sessions — ao display name via `ao session rename` (20-char cap) and Claude Code session title via send-keys `/rename` into the session's own pane (verified live, safe mid-turn); never rename the tmux session (it is the ao session id). Workers rename on claim and on every queue item transition. - Orchestrator standing policy: self-name "AO Master Orch" at startup (full "AO Master Orchestrator" on the Claude Code title), keep spawn --name, and require spawn prompts to carry the worker self-rename duty. - Fleet cap corrected 4 -> 8 per Nick's 2026-07-06 directive (doc was stale). Missing ao primitive documented in #28 (displayName -> harness title sync). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeeHG3EbzwMa4vtpvitrqn
The generated-file banner and scripts/polyscribe.sh usage notes both say "npm run agents", but package.json never defined the scripts. Wire them to scripts/polyscribe.sh so the documented regeneration commands work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeeHG3EbzwMa4vtpvitrqn
- Prefer ao-injected AO_SESSION_ID over the tmux fallback for the session id (Copilot finding). - Stop implying the rename shows in `ao session ls` — name the real surfaces (dashboard, `ao session get`, Claude Code list) and point at gap #28 (Copilot finding). - Define <slug> as lowercase [a-z0-9-] derived from the issue title so raw titles are never interpolated into shell commands (codex-side finding). - Document the assembly layout and the vault-seeded agent-instructions/system/ expectation (agents:system fails on a bare checkout by design). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeeHG3EbzwMa4vtpvitrqn
f8fe423 to
4c0bc8e
Compare
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21.
Orchestration-layer change only — no ao source touched (vanilla rule). All mechanisms were verified live on the implementing session (
agent-orchestrator-9) before being written into policy.What changed
agent-instructions/source/55-extensions.md) — new Session self-naming rules for every ao-hosted session: on claiming a work item and on every queue item transition, set the ao display name (ao session rename "$SID" "#<issue> <slug>", 20-char cap) and — claude-code harness only — the Claude Code session title viatmux send-keys -t "$SID" -l '/rename …'+Enterinto the session's own pane (the same injection pathao senduses; verified safe mid-turn). Never rename the tmux session itself: its name is the ao session id and ao addresses the pane by it.agent-instructions/source/60-orchestrator.md) — the orchestrator self-names at startup:AO Master Orchon the ao side (20-char cap), fullAO Master Orchestratoras the Claude Code title. Spawn--name "#<issue> <slug>"kept; spawn prompts must now carry the worker self-rename duty.package.json— added the missingagents/agents:check/agents:systemscripts that the generated-file banner andscripts/polyscribe.shusage notes already referenced (bug found while building, shipped in-PR per rule 8).AGENTS.md/AGENTS.shared.md/CLAUDE.md/GEMINI.mdregenerated via the assembler;agents:checkpasses.Live verification evidence
ao session rename agent-orchestrator-9 "#21 self-name"— succeeded from inside the session; name visible inao session get --json(displayName).maxDisplayNameLen=20, rename doesn't; upstream Session rename accepts display names longer than the 20-character cap that spawn enforces AgentWrapper/agent-orchestrator#2375/fix(session): enforce 20-char display name cap on rename AgentWrapper/agent-orchestrator#2383) — hence policy pins names to ≤20 chars.tmux send-keys … '/rename #21 self-name'+Enteragainst the session's own pane mid-turn →Session renamed to: #21 self-namein the Claude Code UI without disturbing the running turn.tmux display-message -p '#S'=agent-orchestrator-9= the ao session id ao uses for send-keys addressing.Deviation from AC as written: no scratch worker was spawned to watch a rename (worker sessions don't spawn workers — dispatch is the orchestrator's; fleet-cap discipline). The identical mechanism — a session renaming itself on both surfaces — is what was verified live, on this session.
Follow-ups filed (findings, not changes — vanilla rule)
displayNamehas no first-class path to the harness session title (agent:noauto).backend/internal/clispawn tests fail under ambientAO_SESSION_ID/AO_PROJECT_ID(every ao worker env); proof and upstream-shaped fix in the issue (agent:noauto).Gates
go build ./... && go vet ./... && go test ./...— green (test run withAO_SESSION_ID/AO_PROJECT_IDcleared per ao gap: backend/internal/cli spawn tests fail under ambient AO_SESSION_ID/AO_PROJECT_ID (no env isolation) #31; failures reproduce on unmodifiedmain).tsc --noEmit— green.npm run agents:check— no drift.🤖 Generated with Claude Code
https://claude.ai/code/session_01XeeHG3EbzwMa4vtpvitrqn
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.