Repository navigation
fix(run): keep a resumed conversation when auto-switch skips a seat at its limit - #23
Merged
Merged
Conversation
…t its limit With auto-switch on, seats run claude:b --resume <id> on a seat already at its limit moved to the next seat but resumed there with the same id, where the conversation doesn't exist. It now copies the conversation to the next seat first, as the mid-session switch does. When it can't be copied (not found, or Codex), it opens the seat that has it and says that seat is at its limit.
3 of 8 tasks
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.
Description
With auto-switch on, launching a seat that is already at its usage limit with args that resume a conversation (
seats run claude:b --resume <id>) moved to the next seat but kept the same args, so the CLI there looked for a conversation that seat doesn't have. Only the mid-session switch copied the transcript. This is exactly the command the herdr plugin from #18 reports for restored panes, and whatseats move's "open now" runs.sessions.resumedId(args)reads the session id back from each tool's own resume args:--resume <id>,-r <id>or--resume=<id>for Claude Code (a bare--resumeopens the picker and doesn't count),resume <id>for Codex.superviseuses it instead of knowing about Claude.sessions.find), copies it to the next seat withcopyTranscript, the same way the mid-session switch does, and launches there with the same args.failover, i.e. Codex, whose conversations aren't confirmed to resume on another account), seats stays on the named seat and says in one line that it's at its limit, so you land on your conversation instead of an empty one.test/commands/run.test.tswith the fakeclaude: conversation copied and resumed on the next seat; not found, so it stays with the message;resumedIdfor both tools. The README's auto-switch section has a sentence on it.This was meant for #18 but was pushed after #18 was squash-merged, so it's cherry-picked onto main here.
User-facing changes
BEGIN_COMMIT_OVERRIDE
fix(run): with auto-switch on, resuming a conversation on a seat at its limit carries it to the next seat, or opens it where it is when it can't move
END_COMMIT_OVERRIDE
Type of change
Checklist
bun run checkpasses (Biome lint and format, typecheck, tests)bun src/cli.ts helpruns without errors--dry-runor a throwawayHOMEsrc/providers/<id>/and is listed insrc/providers/index.ts