Skip to content

Session Management ​

Kompile tracks all chat conversations as sessions. Sessions persist across restarts and can be resumed, searched, imported, and managed.

TIP

For the full deep dive — including all 11 external CLI/IDE import adapters, per-vendor native resume commands, changing vendor mid-conversation (/auth, /provider, /model <vendor>:<model>, /model failover), NativeResumeCoordinator, CrossAgentResumeCompactor, and subagent_resume — see Import, Resume & Mid-Conversation Vendor Switching.

List and browse sessions ​

bash
kompile session list                              # List all sessions
kompile session show --id=<id>                    # Show session details
kompile session search --query="authentication"   # Search across sessions

Resume sessions ​

bash
# Resume a specific Kompile standard-chat session (optionally on a new vendor/model)
kompile chat --continue
kompile chat --resume <id>
kompile chat --resume <id> --provider openrouter --model anthropic/claude-sonnet-4-5

# Browse and pick a session across all imported vendors
kompile resume

# Resume a specific session in its original vendor CLI or hand off to another vendor
kompile resume --session-id <id>                       # Auto-detect original vendor (-s shorthand)
kompile resume --session-id <id> --agent claude        # claude --resume <id>
kompile resume --session-id <id> --agent codex         # codex resume <id> (new ID on reconstruction)
kompile resume --session-id <id> --agent agy           # agy --conversation <id>
kompile resume --session-id <id> --agent opencode      # opencode --session <id>
kompile resume --session-id <id> --agent qwen          # qwen --resume <id>
kompile resume --session-id <id> --agent gemini        # gemini --resume <id>
kompile resume --session-id <id> --agent pi            # pi --session <id>
kompile resume --session-id <id> --agent kompile       # kompile chat --resume <id> --mode standard

# Or switch vendors live mid-conversation inside an active chat without exiting:
#   /auth (or /provider)           — terminal vendor, auth route, credential, and model wizard
#   /model <vendor>:<model>        — direct vendor/framework switch in Web Harness & passthrough
#   /model failover                — automatic quota-failover ladder across accounts and vendors

# Restore recently active exited or crash-detected chats in new terminal windows
kompile resume-all                                # Sessions active in the last 30 minutes (default)
kompile resume-all --list                         # Exact sessions the batch would launch
kompile resume-all --dry-run                      # Preview commands without launching
kompile resume-all --active-within 60             # All sessions active in the last 60 minutes
kompile resume-all --recent 5                     # Only the 5 most recently active
kompile resume-all --all                          # Every resumable tracked chat
kompile resume-all --set-recent 20                # Persist a new default limit
kompile resume-all --prune 30                     # Remove entries older than 30 days
kompile resume-all --status                       # Show registry and terminal status

# The same batch action is visible inside standard chat
/resume-all --dry-run
/resume-all --active-within 60

# Or open /resume and enter `resume-all --dry-run` in the resume browser.
# Running chats are excluded; dead-PID entries become resumable automatically.

# Repair stuck locks after a bad/corrupt shutdown
kompile resume-all --unlock <session-id>           # Force one stuck session back to resumable
kompile resume-all --unlock-all                    # Repair abandoned resume claims + dead-PID rows

Import from external providers ​

Import chat history from 11 external coding CLIs and IDEs (claude-code, codex, agy, opencode, gemini, pi, qwen, cursor, aider, cline, continue):

bash
kompile session import --source=claude-code
kompile session import --source=codex
kompile session import --source=agy
kompile session import-all                        # Import from all detected sources

# Agent CLI import with more options (local disk or --remote / --url)
kompile agent chat-import sources                 # List available sources
kompile agent chat-import list --source=claude-code
kompile agent chat-import fetch --source=claude-code --id=<id>
kompile agent chat-import sync --source=claude-code
kompile agent chat-import search --query="topic"

Translate and merge ​

bash
kompile session translate --id=<id> --format=markdown
kompile session merge --ids=<id1>,<id2>

Analytics ​

bash
# Index tool calls and token usage from provider transcripts
kompile index --source=claude --reindex

# View usage statistics
kompile stats --project=my-project --last=7d
kompile stats --session=<id> --json

Released under the Apache-2.0 License.