Skip to content

fix(cli): fresh ephemeral room agents + clean channel teardown#118

Merged
rogeriochaves merged 4 commits into
mainfrom
fix/cli-ephemeral-room-agents
Jun 14, 2026
Merged

fix(cli): fresh ephemeral room agents + clean channel teardown#118
rogeriochaves merged 4 commits into
mainfrom
fix/cli-ephemeral-room-agents

Conversation

@rogeriochaves

Copy link
Copy Markdown
Contributor

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 launch defaults to resume, so a recycled slug reloads a stale or unrelated prior conversation under that id, or dies with "No conversation found".
  • Even with no-resume, 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 delete removed 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: a forceFresh LaunchOption that gates the resume check, for ephemeral agents that should always start clean.
  • Under forceFresh, mint a unique random session id for the launch instead of uuidv5(slug). The stable readable tmux name is preserved, so the card-to-session link holds and the agent stays deliverable.
  • channel delete now removes the <name>.jsonl log too, covering every delete path (CLI, reset tooling, room teardown). A re-created channel starts fresh.
  • Test for the fresh-launch path: a resumable transcript is ignored and a unique id is minted.

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 test in cli/: 274 pass, 0 fail (including the new forceFresh launch test and the updated deleteChannel test).

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.
@rogeriochaves rogeriochaves merged commit 9ae55af into main Jun 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant