ao spawn confirmation output omits the display name set via --name
Bug
ao spawn's confirmation line prints only the generated session ID, never the display name passed via --name (or derived from --prompt), even though the name is persisted immediately. This makes it easy to lose track of which session ID maps to which name at the exact moment the mapping is freshest, forcing a separate ao session get/ao session ls call to look it up again.
Analyzed against: 69dc21d3 (origin/main)
Confidence: High
Reproduction
$ ao spawn --project agent-orchestrator --name "quiet-fox-42" --prompt "..."
spawned session agent-orchestrator-15 (idle)
attach with: tmux attach -t agent-orchestrator-15
The string quiet-fox-42 never appears in the output. Confirmed via ao session get agent-orchestrator-15 --json, which shows "displayName": "quiet-fox-42" was stored immediately.
Root cause, and why the fix is documentation rather than code (revised)
backend/internal/cli/spawn.go resolves the display name locally before the spawn request is even sent, but the confirmation line is built purely from the API response's ID/Status fields, never referencing the already-known name. This is a plain oversight (PR #2302, which introduced --name, wired DisplayName through the request/response DTOs but never touched the confirmation string) — not documented anywhere as intentional.
A code fix (echoing the name in the CLI's own output) was implemented and then deliberately reverted after review. Reasoning: an orchestrator agent already knows the name in the very same tool call where it typed --name — echoing it back in CLI output doesn't teach the agent anything new. What actually causes an orchestrator to report a bare session id to a human isn't missing information, it's a reporting habit (relaying raw CLI/tool output rather than translating it). The fix that targets that directly is a documentation change: backend/internal/skillassets/using-ao/commands/spawn.md now explicitly instructs orchestrator agents to report a spawned session by its --name, not its id, when summarizing for the user.
ao spawn's CLI output itself is unchanged from main — the literal premise of this issue (the CLI omits the name) is still technically true, and intentionally left that way.
A second bug this surfaced: stale names after rename
Preferring the display name over the id introduces its own failure mode: a session's display name is not permanent — it can be changed after spawn via ao session rename <id> <name>, unlike the id, which is fixed for the session's lifetime. An orchestrator agent has no automatic way to learn that a rename happened after it last observed a session; its only "knowledge" of the name is whatever is still sitting in its own conversation memory, which is never invalidated or refreshed automatically. So the "report by name" instruction alone could make an orchestrator confidently repeat a stale, now-wrong name — arguably worse than reporting the id, which never goes stale.
Caught live during review: a worker session's display name changed from investigate-glyphs to glyphs sometime after it was spawned, and the orchestrator only noticed because it happened to re-query the session's current state rather than trust its own memory — otherwise it would have kept reporting the original, now-incorrect name indefinitely.
Fix for this part: added a note to SKILL.md's general Conventions section (not spawn.md, since staleness applies whenever a session is referenced, not just at spawn time) telling orchestrator agents to re-confirm a session's current name via ao session get/ao session ls rather than relying on memory, whenever accuracy matters (long conversations, or after any renaming activity).
Impact
- Orchestrator agents (and humans) previously had no reinforcement of a session's name at spawn time, defaulting to reporting the bare id.
- Fixed via explicit skill instruction, paired with a staleness caveat so the fix doesn't introduce a new "confidently wrong" failure mode via renames.
Priority: low — cosmetic/UX, no functional breakage, workaround (ao session get/ao session ls) always available.
Related
- #2299: added
--nameflag (root feature this issue is about) - PR #2302: implementation that wired
--namethrough without updating the confirmation output - #2380: related but distinct — terminal header display name, not CLI spawn confirmation
- Fixed by PR #2593 (docs-only:
spawn.mdreporting instruction +SKILL.mdstaleness caveat)
Revised framing
On reflection, the original framing of this issue ("the orchestrator doesn't know the name unless it re-queries") wasn't quite accurate — an orchestrator agent already has the name in context from the same tool call it just typed --name into. Echoing it back in the CLI's own confirmation doesn't give the agent new information.
What it does do: orchestrator agents tend to relay ao spawn's raw output largely verbatim in their own reporting to the human, rather than translate it. Shaping that raw output so the name leads works by habit, not by informing the agent — a more robust mechanism than it might first appear, precisely because it doesn't depend on the agent's judgment.
The linked PR pairs this with a second, independent fix: an explicit instruction in the using-ao skill's spawn docs telling orchestrator agents to report a session by its display name rather than its id, regardless of what the raw CLI output looks like. Keeping both — the code-level fix and the doc/skill-level fix — since each covers a gap the other doesn't.
Scope narrowed — docs-only fix, CLI output left unchanged
After further reconsideration, the linked PR's CLI-output code change (echoing the display name in ao spawn's confirmation line) has been dropped. It didn't actually address the real problem: an orchestrator agent already knows the name in the same tool call it passed --name into, so echoing it back teaches the agent nothing new. The "shapes what gets copied into the agent's report" argument doesn't hold up under scrutiny either — an agent careless enough to skip an explicit reporting instruction is also careless enough to not faithfully transcribe a specific CLI output line; these aren't actually independent safeguards.
The PR now contains only a documentation change: using-ao's spawn skill doc explicitly instructs orchestrator agents to report a spawned session by its display name, not its generated id. That's a more direct, honestly-targeted fix for the actual failure mode (what gets reported to the human) than reshaping CLI output and hoping it gets copied faithfully.
ao spawn's CLI output itself remains as it was on main — this issue's original literal premise (the CLI omits the name) is still technically true, but is no longer considered the thing worth fixing.
One more addition to the linked PR
Added a second, related caveat to the same PR: a session's display name isn't permanent — it can be changed after spawn via ao session rename <id> <name> — unlike the session id, which is fixed for the session's lifetime. The "report by name, not id" instruction (this issue's fix) is only correct if the name is actually current; an orchestrator agent has no automatic way to learn about a rename that happened after it last observed a session, so left unaddressed, the instruction could lead it to confidently repeat a stale name — arguably worse than the original id-only behavior, since ids never go stale.
Added to SKILL.md's general Conventions section (not spawn.md, since staleness applies whenever a session is referenced, not just at spawn time): a note telling orchestrator agents to re-confirm a session's current name via ao session get/ao session ls rather than relying on memory, when accuracy matters.
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @neversettle17-101
- @somewherelostt
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @neversettle17-101 and @somewherelostt here. You can also join the AO Discord if you want faster context, want to ask questions live, or just want to follow what the community is building.
You are also welcome to join the AO Discord community.
We do daily Discord calls at 10 PM IST, except Saturday.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
@AgentWrapper, this does not affect spawning or the saved display name. It only omits the name from the confirmation output, so this should remain open as P3.
Assigned to @ApexYash11