Skip to content

feat(cli): /resume <id> switches the live session in-REPL#167

Merged
oratis merged 1 commit into
mainfrom
feat/cli-resume-switch
Jun 7, 2026
Merged

feat(cli): /resume <id> switches the live session in-REPL#167
oratis merged 1 commit into
mainfrom
feat/cli-resume-switch

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented Jun 7, 2026

/resume only listed sessions. Now /resume <id-or-number> switches the running REPL to that session without restarting:

  • loads the target's history and applies it via ctx.newHistory (the existing /rewind replacement path);
  • redirects new messages to it by swapping ctx.sessionId — the agent loop now appends to ctx.sessionId (identical to the launch session.id until a switch), so subsequent turns persist to the resumed session;
  • accepts a full id or a 1-based index into the listed recent sessions (/resume 2).

Tests (+3): switch sets sessionId + newHistory; unknown id errors; no-arg lists. cli 143, typecheck + format:check clean. Doc: /resume row 🟡 → ✅.

🤖 Generated with Claude Code

/resume only listed sessions. Now `/resume <id-or-number>` switches the running
REPL to that session without restarting:
- loads the target's history and applies it via ctx.newHistory (the existing
  /rewind replacement path);
- redirects new messages to it by swapping ctx.sessionId. The agent loop now
  appends to ctx.sessionId (identical to the launch session.id until a switch),
  so subsequent turns persist to the resumed session.
- accepts a full id or a 1-based index into the listed recent sessions.

Tests (parity-commands.test.ts, +3): switch sets sessionId + newHistory, unknown
id errors, no-arg lists. cli 143. Doc: /resume row 🟡 → ✅.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@oratis oratis merged commit 2b63567 into main Jun 7, 2026
3 checks passed
@oratis oratis deleted the feat/cli-resume-switch branch June 7, 2026 09:54
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