| name | continues-cli-session-transfer |
| description | Transfer AI coding sessions between tools (Claude Code, Cursor, Copilot, Gemini, etc.) to bypass rate limits and preserve context |
| triggers | ["resume my Claude session in Cursor","continue this conversation in another AI tool","I hit the rate limit, switch to a different assistant","export my coding session to markdown","handoff this debug session to Gemini","show me my recent AI coding sessions","transfer context from Copilot to Codex","pick up where I left off in another tool"] |
continues CLI Session Transfer
Skill by ara.so — Devtools Skills collection
continues is a CLI tool that extracts AI coding sessions from 16 different tools (Claude Code, Cursor, Copilot, Gemini CLI, Codex, Amp, Cline, Roo Code, Kilo Code, Kiro, Crush, OpenCode, Factory Droid, Antigravity, Kimi CLI, Qwen Code) and transfers them to another tool with full context preservation.
When you hit rate limits mid-debug, continues grabs your conversation history, file changes, tool activity, and reasoning — then hands it off to a fresh AI coding assistant so you can keep working without losing context.
Installation
No installation required with npx:
npx continues
Or install globally:
npm install -g continues
Requirements:
- Node.js 22.5+ (uses built-in
node:sqlite)
- At least one supported AI coding tool installed
Core Workflow
1. Interactive Session Picker (Default)
continues
This scans all 16 tools, shows recent sessions with previews, and lets you select source + destination:
Found 1842 sessions across 16 CLI tools
claude: 723 codex: 72 cursor: 68 copilot: 39 ...
◆ Select a session
│ [claude] 2026-02-19 05:28 my-project Debugging SSH tunnel config 84a36c5d
│ [copilot] 2026-02-19 04:41 my-project Migrate presets from Electron c2f5974c
│ [codex] 2026-02-18 23:12 my-project Fix OpenCode SQLite parser a1e90b3f
◆ Continue in:
│ ○ Gemini ○ Codex ○ Amp ○ Kiro ...
When run from a project directory, sessions from that directory appear first.
2. Quick Resume (Same Tool)
Resume your latest session from a specific tool without the picker:
continues claude
continues codex 3
continues cursor
continues amp
continues cline
continues kiro
continues crush
continues kimi
continues qwen-code
This uses native resume — same tool, full history intact, no context injection needed.
3. Cross-Tool Handoff
Transfer a session from one tool to another:
continues resume abc123 --in gemini
continues resume abc123 --in codex --yolo --search --add-dir /tmp
continues resume abc123 --in codex --debug-prompt
Common flags are automatically mapped to the destination tool's equivalent:
- Model selection
- Sandbox/safety mode
- Auto-approve mode
- Additional directories
Unknown flags pass through as-is to the destination tool.
Session Discovery & Listing
List Sessions
continues list
continues list --json
continues list --jsonl
continues list --source claude
continues list -n 10
continues list --source cursor --json -n 5
Scan & Rebuild Index
continues scan
continues scan --rebuild
continues rebuild
The index is cached at ~/.continues/sessions.jsonl with a 5-minute TTL. Auto-refreshes on access after expiry.
Session Inspection
Diagnostic View
continues inspect abc123
continues inspect abc123 --truncate 50
continues inspect abc123 --preset full --write-md handoff.md
Diagnostic output includes:
- Session metadata (tool, project, timestamp, model)
- Message count and content samples
- Tool activity summary (bash, edit, grep, MCP calls)
- Token usage and caching stats
- File path of original session data
Bulk Export
Export all sessions to files for backup, analysis, or archival:
continues dump all ./sessions
continues dump claude ./sessions/claude
continues dump gemini ./sessions/gemini
continues dump all ./sessions --json
continues dump all ./sessions --preset full
continues dump all ./sessions --limit 50
File naming: {source}_{id}.md or {source}_{id}.json
Verbosity Presets
Control how much detail goes into handoff documents:
| Preset | Messages | Tool Samples | Subagent Detail | Use Case |
|---|
minimal | 3 | 0 | None | Quick context, token-constrained |
standard | 10 | 5 | 500 chars | Default balance (recommended) |
verbose | 20 | 10 | 2000 chars | Complex multi-file tasks |
full | 50 | All | Everything | Complete session capture |
continues resume abc123 --in gemini --preset full
continues inspect abc123 --preset minimal
continues dump claude ./out --preset verbose
Configuration
YAML Config File
Create .continues.yml in your project root for per-project defaults:
preset: verbose
recentMessages: 15
keyDecisions: 8
shell:
maxSamples: 10
stdoutLines: 20
stderrLines: 20
files:
maxSamples: 15
contentLines: 50
subagent:
maxSummaryChars: 2000
Config resolution order:
--config <path> flag
.continues.yml in current directory
~/.continues/config.yml (global user config)
standard preset (default)
See .continues.example.yml in the repo for full reference.
Environment Variables
Override default session directories:
export CLAUDE_CONFIG_DIR="$HOME/.config/claude"
export CODEX_HOME="$HOME/.config/codex"
export GEMINI_CLI_HOME="$HOME/.config/gemini"
export XDG_DATA_HOME="$HOME/.local/share"
Handoff Document Structure
When you resume in a different tool, continues generates a structured markdown document:
# Session Handoff: [Project Name]
**From:** claude (session abc123)
**Original Path:** ~/.claude/projects/my-project/sessions/abc123.jsonl
**Started:** 2026-02-19 05:28
**Model:** claude-sonnet-4
**Tokens:** 45,230 in / 12,847 out (7,234 cached)
## Context
[Summary of what the user was working on]
## Recent Messages
**User:** I need to debug the SSH tunnel configuration
**Assistant:** I'll help you check the SSH config...
[10 most recent messages by default]
## Tool Activity
- **Bash** (×47): `$ npm test → exit 0` · `$ git status → exit 0` · `$ npm run build → exit 1`
- **Edit** (×12): `edit src/auth.ts` · `edit src/api/routes.ts` · `edit tests/auth.test.ts`
- **Grep** (×8): `grep "handleLogin" src/` · `grep "JWT_SECRET"` · `grep "middleware"`
## Key Decisions
- Switched from JWT to session tokens for better security
- Added middleware for token refresh race condition handling
- Need to handle the edge case where token refresh races with logout
## Files Referenced
- src/auth.ts (edited 3 times)
- src/api/routes.ts (edited 2 times)
- tests/auth.test.ts (created)
This handoff is injected as the first message in the new tool, giving the AI full context to continue.
Supported Tools & Session Locations
| Tool | Format | Default Location |
|---|
| Claude Code | JSONL | ~/.claude/projects/ |
| Codex | JSONL | ~/.codex/sessions/ |
| Copilot | YAML + JSONL | ~/.copilot/session-state/ |
| Gemini CLI | JSON | ~/.gemini/tmp/*/chats/ |
| OpenCode | SQLite | ~/.local/share/opencode/storage/ |
| Factory Droid | JSONL + JSON | ~/.factory/sessions/ |
| Cursor | JSONL | ~/.cursor/projects/*/agent-transcripts/ |
| Amp | JSON | ~/.local/share/amp/threads/ |
| Kiro | JSON | ~/Library/Application Support/Kiro/workspace-sessions/ |
| Crush | SQLite | ~/.crush/crush.db |
| Cline | JSON | VS Code globalStorage/saoudrizwan.claude-dev/tasks/ |
| Roo Code | JSON | VS Code globalStorage/rooveterinaryinc.roo-cline/tasks/ |
| Kilo Code | JSON | VS Code globalStorage/kilocode.kilo-code/tasks/ |
| Antigravity | PB + brain | ~/.gemini/antigravity/ |
| Kimi CLI | JSONL + JSON | ~/.kimi/sessions/ |
| Qwen Code | JSONL | ~/.qwen/projects/*/chats/ |
All reads are read-only — continues never modifies your session files.
TypeScript Integration (Library Usage)
While continues is primarily a CLI tool, you can import its parsers programmatically:
import { SessionParser } from 'continues';
import { parseClaude } from 'continues/parsers/claude';
const session = await parseClaude('~/.claude/projects/my-project/sessions/abc123.jsonl');
console.log(session.messages);
console.log(session.toolActivity);
console.log(session.metadata);
Common Patterns
Rate Limit Workflow
continues claude --in gemini
continues resume abc123 --in gemini --preset verbose
Multi-Tool Debugging
claude
continues claude --in codex
continues codex --in cursor
continues dump all ./debug-session-archive --preset full
Session Archival
continues dump all ~/backups/ai-sessions-$(date +%Y%m%d) --json
continues dump claude ~/archives/claude --preset full --limit 100
Inspect Before Handoff
continues inspect abc123 --preset standard
continues resume abc123 --in gemini --debug-prompt > handoff.txt
continues resume abc123 --in gemini
Troubleshooting
"No sessions found"
Cause: continues can't locate session directories for installed tools.
Fix:
- Verify the tool is installed:
which claude or which cursor
- Check if sessions exist:
ls ~/.claude/projects/ or ls ~/.cursor/projects/
- Override location with env vars:
export CLAUDE_CONFIG_DIR="$HOME/custom-location"
continues scan --rebuild
"Session index is stale"
Cause: Cached index hasn't refreshed after adding new sessions.
Fix:
continues rebuild
"Unknown flags passed to destination tool"
Cause: You used a flag that continues doesn't recognize and the destination tool doesn't support it.
Fix: This is expected behavior — unknown flags pass through. Check the destination tool's --help to verify supported options:
gemini --help
codex --help
"Handoff document is too large"
Cause: Session has hundreds of messages and you're using --preset full.
Fix:
continues resume abc123 --in gemini --preset standard
continues resume abc123 --in gemini --preset minimal
Symlink traversal errors
Cause: Session directory contains symlinks that fs.Dirent.isDirectory() doesn't follow.
Fix: This is fixed in recent versions. If you see this error:
- Update to latest:
npm install -g continues@latest
- Force rebuild:
continues rebuild
Zero token display
If you see "0 in / 0 out" for sessions that should have token data:
Cause: Some tools don't store token metadata in session files.
Expected behavior: Only Claude Code, Codex, Cursor, and Gemini consistently report tokens. Other tools may show zero.
Development & Extending
Adding a New Tool Parser
- Create parser in
src/parsers/your-tool.ts:
import type { Session } from '../types';
export async function parseYourTool(filePath: string): Promise<Session> {
return {
id: 'session-id',
source: 'your-tool',
projectPath: '/path/to/project',
timestamp: new Date(),
messages: [...],
toolActivity: [...],
metadata: { ... }
};
}
- Add tool name to
src/types/tool-names.ts:
export const TOOL_NAMES = [
'claude', 'codex', 'cursor', 'gemini',
'your-tool',
] as const;
- Register in
src/parsers/registry.ts:
import { parseYourTool } from './your-tool';
export const PARSERS = {
'claude': parseClaude,
'codex': parseCodex,
'your-tool': parseYourTool,
};
The registry has compile-time completeness checking — if you forget to add the parser, TypeScript throws an error at import.
Running Tests
pnpm install
pnpm test
pnpm run test:watch
pnpm run dev
Quick Reference
continues
continues claude
continues codex 3
continues resume <id> --in <tool>
continues list [--json|--jsonl] [--source <tool>] [-n <count>]
continues inspect <id> [--preset <level>] [--truncate <chars>]
continues dump <tool|all> <dir> [--json] [--preset <level>] [--limit <n>]
continues scan --rebuild
--config <path>
--preset <level>
--verbose
--debug