Skip to content

fix(run): keep a resumed conversation when auto-switch skips a seat at its limit - #23

Merged
gelzinn merged 1 commit into
mainfrom
fix/resume-auto-switch
Oct 28, 2026
Merged

gelzinn merged 1 commit into
mainfrom
fix/resume-auto-switch

Conversation

@gelzinn

@gelzinn gelzinn commented Oct 28, 2026

Copy link
Copy Markdown
Owner

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 what seats move's "open now" runs.

  • A new 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 --resume opens the picker and doesn't count), resume <id> for Codex. supervise uses it instead of knowing about Claude.
  • When the pre-launch switch happens and the args resume a session, seats finds the conversation on the start seat (sessions.find), copies it to the next seat with copyTranscript, the same way the mid-session switch does, and launches there with the same args.
  • When it can't be copied (not found, or a source without 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.
  • Launches that don't resume anything switch exactly as before.
  • Tests in test/commands/run.test.ts with the fake claude: conversation copied and resumed on the next seat; not found, so it stays with the message; resumedId for 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

  • Bug fix
  • New provider
  • New feature
  • Docs / metadata

Checklist

  • bun run check passes (Biome lint and format, typecheck, tests)
  • bun src/cli.ts help runs without errors
  • Changes to seat folders were tried with --dry-run or a throwaway HOME
  • A new provider (if added) lives in src/providers/<id>/ and is listed in src/providers/index.ts

…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.
@gelzinn
gelzinn merged commit 9af4c29 into main Oct 28, 2026
7 checks passed
@gelzinn gelzinn self-assigned this Oct 28, 2026
@gelzinn
gelzinn deleted the fix/resume-auto-switch branch October 28, 2026 17:24
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