fix(cli): fresh ephemeral room agents + clean channel teardown#118
Merged
Conversation
channel delete removed the metadata but left the append-only <name>.jsonl log, so a channel re-created with the same name replayed stale history. Remove the log too; covers every delete path (CLI, reset tooling, room teardown).
Recycled readable slugs (a room's swarm reusing names like dax/enzo) share a deterministic session id via uuidv5(slug), so the default resume reloads a stale or unrelated prior conversation under that id (or dies with 'No conversation found'). --no-resume forces a fresh session regardless, via a forceFresh LaunchOption that gates the resume check.
--no-resume alone still passed claude --session-id <uuidv5(slug)>, which collides with a recycled slug's prior transcript: claude errors 'Session ID already in use' and the card<->session link breaks. Under forceFresh, mint a random session id for the launch (stable readable tmux name preserved) so an ephemeral recycled-slug agent always starts cleanly and is deliverable.
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.
Why
Ephemeral "rooms" of agents spin up a handful of Claude sessions under short readable slugs (e.g.
dax,enzo,faye) and have them coordinate in a shared channel. Because the launch derives a deterministic session id from the slug (uuidv5(slug)), reusing those names across rooms breaks in two ways:kanban launchdefaults to resume, so a recycled slug reloads a stale or unrelated prior conversation under that id, or dies with "No conversation found".claude --session-id <uuidv5(slug)>collides with the slug's own prior transcript and errors "Session ID already in use", which breaks the card-to-session link so missions never deliver and the room looks dead.Separately,
channel deleteremoved the metadata but left the append-only<name>.jsonl, so a channel re-created with the same name replayed stale history.What
kanban launch --no-resume: aforceFreshLaunchOption that gates the resume check, for ephemeral agents that should always start clean.forceFresh, mint a unique random session id for the launch instead ofuuidv5(slug). The stable readable tmux name is preserved, so the card-to-session link holds and the agent stays deliverable.channel deletenow removes the<name>.jsonllog too, covering every delete path (CLI, reset tooling, room teardown). A re-created channel starts fresh.Notes
Extracted from hackathon work on a voice-orchestrated room of agents, rebased onto latest
main. The handle-from-tmux-session fix from that batch is already covered upstream by the channels + CLI work in #105, so it is not included here.Tests
pnpm testincli/: 274 pass, 0 fail (including the newforceFreshlaunch test and the updateddeleteChanneltest).