Features
Detailed description of every feature. For an overview see the README.
Six sources
| Source | CLI | Local data | Content blocks |
|---|---|---|---|
| Claude | Claude Code | ~/.claude/projects/ | Thinking, tool calls |
| Codex | Codex CLI | ~/.codex/sessions/ | Reasoning, function calls |
| Grok | Grok CLI | $GROK_HOME/sessions/ or ~/.grok/sessions/ | Reasoning, text |
| Oh My Pi | Oh My Pi | ~/.omp/agent/sessions/ or an initialized $XDG_DATA_HOME/omp/.../sessions/ | Thinking, tool calls and results |
| Gemini | Gemini CLI | ~/.gemini/tmp/<project>/chats/ | Thought summaries, tool calls and results |
| Antigravity | Antigravity IDE / CLI (agy) | ~/.gemini/antigravity*/brain/, plus cc-switch's ~/.cc-switch/agy/<provider>/antigravity-cli/brain/ | Thinking, tool calls and results |
Gemini and Antigravity are read-only sources: browsing, search, export, aliases and tags, statistics, and terminal resume work; in-app chat and fork do not. In session transfer, Gemini CLI sessions can be exported and imported, while Antigravity sessions can only be exported as a backup. Only Antigravity sessions created by the CLI can be resumed or deleted; deletion runs agy conversations clean and is permanent (no recycle bin). For IDE sessions both buttons are disabled with a hint to use the IDE.
Navigation and display
- The sidebar has two levels. The narrow rail on the left holds the top-level entries — the six sources (Claude, Codex, Grok, Oh My Pi, Gemini, Antigravity), then Tools, Settings, and the machine picker at the bottom — each labelled under its icon. The panel on the right shows the second level of the current entry.
- With a source selected, the panel lists its pages: projects, search, bookmarks, statistics, Skills, plus invalid items and provider sync (Codex only) where they apply; Claude and Codex have New chat next to the panel title. Below are the five most recently viewed sessions (per machine and source) and the twelve most recently active projects; typing in the filter searches every project.
- Tools holds the recycle bin, session transfer, and the Apps page. Settings hides the panel and uses its own section list.
- Pages every source has (search, bookmarks, Skills) stay put when you switch sources; other pages return to the project list. Clicking a source from Tools or Settings opens its projects. The active source is remembered across reloads.
- « next to the panel title collapses the sidebar to the rail; » at the top of the rail expands it again. The choice is remembered.
- The machine button shows the current machine and its connection status; click it to switch machines or manage them.
- Tools → Apps chooses which sources appear in the sidebar (at least one) and shows where each keeps its sessions on the current machine.
- Light, dark, and system themes are chosen in Settings → Display.
- Page headers use a source › project › session breadcrumb.
- Long sessions show a position rail with a tick for every question — hover to preview, click or drag to jump.
- Load failures show the reason and a Retry button; every dialog closes with Escape.
- Projects and sessions use card grids by default. List/grid preferences are saved independently, with virtualized rows for large collections.
- Below 1024px, navigation becomes a drawer. Below 1280px, the question index overlays the reader and can be dismissed with Escape.
- Select Chinese or English in Settings → Display → Language. The default is Chinese regardless of system locale; language preference is saved per browser or desktop WebView. UI labels, dialogs, application hints, and relative times follow this choice. Raw session text and CLI/server diagnostics remain unchanged.
- Time zone is configured independently. Choose the system zone or an IANA zone; timestamps and statistics date boundaries follow it without changing stored UTC data.
Projects and sessions
Projects are sorted by recent activity and show session counts and timestamps. Claude, Codex, Grok, and Oh My Pi persist project and session summaries; Gemini and Antigravity cache them in memory. All of them re-read only new or changed history files (judged by high-resolution modification time and length), including changes made while the app was closed. Manual cache refresh is also available.
The project Actions menu offers path copying and session-data deletion (every source except Antigravity, whose CLI sessions are deleted one by one or in a batch from the session list). Claude additionally supports project aliases and related configuration cleanup. Batch selection supports deleting multiple projects, with recoverable operations moved to the recycle bin.
Session cards show the first prompt or alias, message count, branch, and creation/modification times. Codex internal/noninteractive sessions are filtered out. Grok reads summary.json and chat_history.jsonl. Oh My Pi supports named profiles, initialized XDG directories, and related artifact directories. Gemini CLI reads ~/.gemini/tmp/<project>/chats/session-*.jsonl (older session-*.json files too, unless already migrated), takes the project path from .project_root or ~/.gemini/projects.json, and hides injected workspace context. Antigravity reads brain/<id>/.system_generated/logs/transcript_full.jsonl for both the IDE and the CLI; titles and workspaces come from conversation_summaries.db (opened read-only), annotations, and CLI history, sessions without a workspace are grouped under "No workspace", and cards show whether a session came from the IDE or the CLI.
- Export one or many sessions as JSON, Markdown, or HTML. Desktop uses a file dialog; web mode downloads through the browser.
- Add aliases and tags, filter by tags, and bookmark entire sessions or individual messages. Claude stores them in each project's
.session-viewer-meta.jsonand Codex in~/.codex/.session-viewer-meta.json. Grok, Oh My Pi, Gemini, and Antigravity never write to the tools' own directories; their aliases and tags live inmetadata/<source>.jsonin the app directory (see below). - Claude aliases synchronize with Claude Code's
/rename. - Review empty or corrupt sessions in the invalid-items page before deleting them. Deletion moves sessions to the recycle bin on both desktop and web. Antigravity items are shown read-only.
- The recycle bin supports restoring original paths, removing orphan directories, and permanent deletion after confirmation. Deleting a whole Codex, Oh My Pi, Grok, or Gemini project creates a single recycle-bin entry. The orphan-directory scan moves orphan Claude UUID directories to the recycle bin and deletes empty Codex date folders directly.
Reading conversations
Pagination and jumps validate both session and window identity before applying results. Load all stays with its original session and stops on navigation or window replacement. Directory jumps are disabled while messages load.
Markdown, syntax highlighting, tool calls/results, and collapsible thinking/reasoning blocks are supported. The latest 30 messages load first; earlier messages load on demand without losing the scroll position. Large blocks initially use plain-text previews, with Markdown rendering available explicitly.
The reader provides message, question-summary, and Codex trace views. Display options control timestamps, model names, expansion, and split panes. The Details menu contains session metadata, costs, and resume commands. The question index starts collapsed and remembers your preference.
The Codex trace view includes turns, approximate steps, tool duration and failures, reasoning, sub-agents, context compaction, and token breakdowns. It handles legacy and history_base segmented rollouts; see TRAJECTORY.md.
Resume and fork
Resume a session through its CLI or continue Claude and Codex conversations from the composer at the bottom of the session page. Commands: Claude claude --resume {id}, Codex codex resume {id}, Grok grok -r {id}, Oh My Pi omp --resume {id}, Gemini gemini --resume {id}, Antigravity agy --resume {id}. Gemini CLI and agy only look up sessions of the current project, so the command runs in the session's project directory (one-click resume switches there automatically; change to it first when copying the command). Only Antigravity sessions created by the CLI can be resumed with agy; for IDE sessions the resume button is disabled and explains that the session was created in the IDE and must be opened there. Sessions that cc-switch ran through agy for an API-key provider resume with that provider's --gemini_dir (agy --gemini_dir=<dir> --resume {id}) and need the provider's GEMINI_API_KEY in the terminal environment.
Fork buttons appear below user questions and in the question summary. Forking creates an independent session containing earlier history and the selected turn's full reply, including tool calls and results. Later turns are excluded and the original is preserved. Claude, Codex, Grok, and Oh My Pi support fork; Gemini and Antigravity are read-only and do not.
- Desktop local mode opens a terminal and navigates to the new session. If terminal launch fails, the created fork remains available for retry.
- Web and remote-node forks are created on the server hosting the session.
- Codex uses native
codex app-serverfork operations and verifies history boundaries. Unsupported or stale positions fail explicitly rather than silently copying the wrong history. - Oh My Pi follows the selected node's ancestor chain and copies attachments.
- Grok preserves raw history and prompt context while generating a new session identity.
POST /api/sessions/fork accepts { source, originalFilePath, userMsgUuid } and returns { newSessionId, newFilePath, projectPath, projectId }. Existing authentication and source-specific path validation apply.
Repair thinking blocks (Claude)
Resuming a Claude session through a different provider or relay can fail with 400: each thinking block must contain thinking (newer models return thinking blocks through the official API with only a signature and empty thinking, which some relays reject) or Invalid signature in thinking block (the signature comes from another provider).
Open Repair thinking blocks from the session list's action menu or the message page's Details menu; sessions with empty thinking blocks also show a hint bar with a repair button and Don't show again. The dialog previews how many blocks and lines change before anything is written.
- Remove empty thinking only (default) fixes the first error. Remove all thinking also removes thinking with content and
redacted_thinking, which fixes signature errors. Thinking from earlier turns is not part of the model context, so the conversation stays the same. - A line left with only thinking is dropped, and records pointing to it (
parentUuid,logicalParentUuid,leafUuid) are reconnected to its parent. Untouched lines are written back byte for byte. - The original file is rewritten in place, so the session ID and resume command stay the same. It is first backed up to
repair-backups/<project>/<session>.<time>.jsonlin the app data directory; to restore, copy it back to the original directory as<session>.jsonl. The repair stops if the file changes meanwhile, its last line is incomplete, or a line is corrupt. Sub-agent transcripts are not modified.
POST /api/sessions/repair-thinking accepts { source, filePath, mode: "empty" | "all", apply }; apply: false only returns the preview. Only source: "claude" is supported.
Search and statistics
Bookmarks, search results, and billing rows use ?scrollTo= message links; legacy billing #m= links remain supported. User, assistant, and tool messages can be located by absolute index, loading only a nearby 31-message window when needed. Missing targets and read failures offer feedback and retry. Legacy bookmarks without UUIDs that stored a page-relative position cannot reliably recover their original target.
Question navigation and message lookup share a separate compact index containing bounded previews, question relationships, and ID positions. Navigation requests do not populate the full-message cache. Indexes invalidate on file length or high-resolution modification time changes, concurrent requests for a session share a scan, and the cache holds up to 20 sessions.
Clearing a search or changing its source/scope invalidates older requests, so late responses cannot overwrite the current results.
Claude statistics invalidate cached files by length and high-resolution modification time, including appends within one second. Files changing during a scan are retried on a later refresh. Older statistics caches rebuild once after upgrading; original sessions are unchanged.
An empty cross-project tag result is cached instead of triggering repeated requests. Tag read failures offer an explicit Retry action, and changing sources clears the previous source's tag loading state.
Search across projects by message content, session names, and tags. Switch between individual matches and results grouped by session. Selecting a result jumps to the matching message. Sessions are first prefiltered on raw text, alias, title, and tags, and only matching ones are fully parsed.
All six sources have token and cost statistics, following the accounting rules of cc-switch. They include input/output/cache tokens, USD costs, cache hit rates, daily/hourly trends, model usage, and the top ten projects by cost. Models without pricing are marked Unpriced.
| Source | Reads | Accounting |
|---|---|---|
| Claude | Main sessions plus sub-agent sessions under <session>/subagents/ (including workflows/wf_*) | Deduplicated by API message id: streamed rows and history copied into a new session by resume / fork count once, preferring the final row with stop_reason; all-zero rows (such as <synthetic>) are skipped; 1-hour cache writes are billed at 2× input |
| Codex | sessions/ and archived_sessions/, including .jsonl.zst compressed sessions (each thread read once) | Uses each request's last_token_usage, otherwise the difference against the cumulative high-water mark; duplicate snapshots re-sent on rate-limit refresh count as zero; parent history replayed at the start of fork / sub-agent threads is not counted again; remote compaction usage recorded only in token_usage_record is added; cached_input_tokens are billed at the cached rate |
| Gemini CLI | tokens on each reply in the session file | input includes cache hits, which are split out and billed at the cached rate; thought tokens are billed as output |
| Antigravity | Usage on each planner step in the transcript | Input excludes cache and output includes thinking, so values are taken at face value; a missing model is taken from the user's model-switch record |
| Grok | turn_completed in updates.jsonl across session directories (including archived_sessions) | Each turn is taken at face value per model, without differencing; inputTokens include cache reads; the CLI's own costUsdTicks is preferred, and grok-4.x-build is priced as grok-4.x |
| Oh My Pi | Assistant / toolResult messages, compaction, branch_summary, and model_usage records | Input excludes cache; the recorded cost is preferred; sub-agent usage counts toward its parent session |
A complete cost reported by the tool takes precedence over local prices. A partial cost (a lower bound) is replaced by the local price, and used only when the model has no local price.
Per-request costs support project, model, and date filters; a row opens the corresponding message. Each page contains up to 500 records, with previous/next controls, the current range, total count, and page number. Failed page loads retain the current records and offer a retry; changing filters, source, or time zone returns to the first page. Session cost details can be copied as a Markdown table. Time-zone selection controls date boundaries. Statistics cover files present on the selected machine and source.
Codex costs use each turn's turn_context.model, thread_settings_applied, or the model recorded on the usage snapshot (with provider/ prefixes and date suffixes removed), including model switches within a session. cached_input_tokens are split out of the input and billed at the cached rate, and count toward the cache hit rate. Usage without a recorded model remains unknown / Unpriced; a Provider name is never used as a model identifier.
Prices come from the LiteLLM community price list, covering Claude, GPT, Grok, Gemini, DeepSeek, Qwen, Kimi, GLM and others. npm run sync-prices writes the snapshot shipped with each release (crates/session-core/data/model-prices.json). Settings → Model prices can turn on online updates: the list is downloaded once a day into pricing/ in the app directory, and the previous data stays in use if a download fails. Claude / GPT models missing from the list use built-in official prices. Rates are per model for cache reads (for example 0.05× on Opus 5.5), 5-minute and 1-hour cache writes (1.25× / 2×), and long-context tiers (for example Haiku 5.5 above 100K and GPT-5.4 above 272K prompt tokens).
The Claude statistics cache and the Codex usage cache persist in the app config directory (stats-cache.json, codex-usage-cache.json), and only changed files are parsed again. Compressed Codex sessions are decompressed while reading and parsed in parallel; the first scan of many compressed sessions can take tens of seconds, after which the disk cache is used. Gemini, Antigravity, Grok, and Oh My Pi usage is cached per file in memory. Concurrent readers share one build per file; directory enumeration and file metadata checks still run. Time-zone aggregations are not cached, so changing the time zone recalculates immediately. Read failures return errors; retry later if files are changing continuously.
In-app chat
Choose New chat, select a working directory, and chat through the installed Claude or Codex CLI (on this machine, or on the machine running the web server). Once the first reply finishes, the conversation moves to its session page, where the composer stays docked at the bottom. Replies stream with Markdown and tool viewers for Read, Edit, Write, Bash, Grep, and Glob. Long conversations use virtual scrolling. If the CLI isn't detected, the page links straight to Settings → Chat.
By default the web server rejects client requests to skip permissions or to supply their own API key / base URL; enable them explicitly with --allow-skip-permissions / --allow-client-credentials. Grok, Oh My Pi, Gemini, and Antigravity use terminal resume instead of in-app chat.
The app remembers model choices, supports custom model IDs, and attempts to match the historical model when resuming. Use /model or Ctrl+K to switch models. Chat settings include CLI paths, API/base-URL overrides, Windows terminal choice, and permission mode.
Codex chat notifications are routed by thread. Late events for closed or unsubscribed threads are not delivered to other conversations.
If a Codex notification buffer overflows or app-server exits, affected streams report an error and stop waiting. Reload the session to recover. One slow subscriber does not block healthy subscribers.
Cancellation requested during startup is retained. A Codex task interrupts only its own turn in the original runtime; each thread in that runtime permits one active send task. Disconnecting a web chat ends its active streams in the UI, while the server cancels and waits for the connection's tasks to exit. Detached background chat is not supported. Cancellation failures or missing CLI stop confirmations return errors.
Failed or cancelled chats retain their input, received content, and error information. A successful live reply is cleared only after it appears in the historical message window; failed refreshes or older history windows keep that reply visible. Leaving a chat page or switching sessions cancels its active task and any delayed follow-up that has not been sent.
Skills, MCP, and plugins
Skill and MCP previews belong to the selected source and target nodes. Changing either node requires a fresh preview. Node selection stays fixed during synchronization, and stale previews or duplicate submissions cannot start a write.
Skills for the selected source open from its panel in the sidebar; Claude's session pages also embed a collapsible Skills panel. Each source reads its own directory, as cc-switch does: Claude Code ~/.claude/skills, Codex ~/.codex/skills, Gemini CLI ~/.gemini/skills, Antigravity ~/.gemini/config/skills, Grok $GROK_HOME/skills (~/.grok/skills), Oh My Pi <agent dir>/skills (~/.omp/agent/skills). Each source can view, import ZIP archives, and delete its own skills; ~/.agents/skills, the shared store that tools such as cc-switch distribute from, is listed separately for every source and is read-only here. Switching sources on the Skills page stays on it, so different CLIs can be compared directly.
Claude only: plugin skills under ~/.claude/plugins/ (read-only), project skills under <project>/.claude/skills, and cross-machine sync. In every case, deleting a symbolic-link skill removes the link only and deleting a real skill directory is permanent.
Global Claude skills can be synchronized between two accessible session-web nodes after reviewing additions and conflicts. Overwrites are backed up, written files are checked, and failed writes restore the previous version. Backups live in the target's ai-session-viewer/skill-backups/ configuration directory.
MCP sync compares Claude mcpServers and Codex mcp_servers. Sensitive and machine-specific values are redacted from transfers. Existing target secrets are preserved, stale previews are rejected, and writes are backed up to ai-session-viewer/config-backups/.
Plugin declarations are preview-only. Plugin caches, installation directories, artifacts, and credentials are not copied; install plugins using the target machine's normal CLI workflow.
Codex provider sync
Sync, switch, and clone operations save all required backups before changing source data and stop if backup creation fails. Switching preserves the original config.toml, including its absence, so restoration can return to the implicit default. Later write failures may still require restoring the backup; changes across files are not one automatically rolled-back transaction.
After changing providers, old rollouts and SQLite metadata may still reference the previous provider and disappear from Codex Desktop or /resume. Provider sync aligns rollout headers, SQLite threads, and global-state paths, optionally updating model_provider in config.toml.
Changes are backed up to ~/.codex/backups_state/provider-sync/; restoration can select configuration, database, sessions, and global state separately. Encrypted history may still fail to resume across providers with invalid_encrypted_content. Use the original provider when reliable resume is required.
Repair old sessions: after switching between a third-party login and the official login, config.toml may no longer define the provider recorded by old sessions, and Codex fails with Model provider `custom` not found. The page lists providers referenced by rollouts, archived sessions, or SQLite threads that are neither built in nor defined under [model_providers.*], and appends compatibility definitions to config.toml: by default the current OpenAI login and default endpoint (wire_api = "responses", requires_openai_auth = true, no base_url), or a copy of a configured provider. Existing lines are untouched, the result is validated as TOML, and the write stops if the file changed meanwhile. Session files, SQLite, and login data are not modified; config.toml is backed up first and can be restored from the backup history.
Session transfer
Tools → Session transfer moves sessions between computers. Export selected sources (all six), all projects or chosen ones, into one .zip containing the original session files, sub-agent and tool-result directories, Claude project memory and index, Codex threads rows and thread names, Gemini CLI chats/ sessions, Antigravity brain/<id>/ directories and annotations, plus Viewer aliases, tags, and bookmarks. Files are streamed, so multi-gigabyte exports do not need much memory.
Importing first shows a preview: sessions per project, sessions that already exist here, and whether the original project path exists. A project can be mapped to a different local directory; recorded working directories (cwd) are rewritten so sessions can be continued locally, while message text is left untouched. Existing sessions are skipped by default; overwriting moves the local copy to transfer/backups/ in the app directory first. Archive paths are validated before anything is written, and a failed session is rolled back.
Gemini CLI sessions go back to ~/.gemini/tmp/<project>/chats/, and the project is registered in .project_root and ~/.gemini/projects.json (existing entries are left alone), so gemini --resume finds them. When a project is mapped to another directory, each session's projectHash is recomputed for the new path; if the directory name belongs to another project, <name>-2 and so on is used instead.
Antigravity sessions can be exported as a backup but not imported. Besides the transcript, each session is registered in the database Antigravity itself has open (conversation_summaries.db) and in its conversations/ folder. Those are internal formats, and writing to them from outside could corrupt its data; putting back only the transcripts would leave the sessions invisible to agy --resume and the IDE. The import preview therefore marks Antigravity as not importable, explains why, and skips it. Use the backup for archiving, or unzip it to read the transcripts.
Sessions may contain code, command output, and secrets, so keep exports safe. Encrypted Codex history may fail to resume under a different account or provider.
Move a project (this machine)
Move project on the same page relocates a project folder on this machine (rename or reorganize) and takes its sessions along. Preview the changes, then let the app move the folder (same disk partition) or choose "Folder already moved by hand" to update the records only. Claude project directories under ~/.claude/projects/ are renamed to the new encoding (merged if one exists), and transcript cwd, sessions-index.json, ~/.claude.json project settings, and history.jsonl follow. Codex rollout cwd, threads.cwd in state_5.sqlite, [projects."<path>"] trust entries, and Desktop workspace roots are updated, as are Grok / Oh My Pi session cwd fields (and their path-named directories when verifiable) and bookmarks. Sub-directory projects move too; message text is untouched. Config and index files are backed up to transfer/backups/relocate-<timestamp>/ in the app directory. Every step can be re-run, so an interrupted move is finished by running it again with "Folder already moved by hand"; to undo, move the folder back. Quit AI tools and editors using the project first.
Updates and file watching
Installed desktop packages use the in-app updater. Windows portable packages link to GitHub Releases. Updates can be checked in Settings, and individual versions can be skipped.
Desktop and web file watchers batch changed paths to refresh affected projects. Desktop also performs a periodic background refresh. Metadata, indexes, and bookmarks use atomic writes.
Both modes check configured provider roots (all six sources; Antigravity has several brain/ directories for the IDE and the CLI) every five seconds and restore watches for directories created after startup or deleted and recreated. Restoring a watch refreshes that source and affected open sessions to include files written during the gap. Ordinary file events remain incremental; watches stay within provider roots.
The app keeps its own data — bookmarks (bookmarks.json), the recycle bin, aliases and tags of read-only sources, prices, statistics caches, transfer and configuration backups, and the write lock — in the ai-session-viewer app directory: %APPDATA%\ai-session-viewer on Windows, ~/.config/ai-session-viewer on Linux, ~/Library/Application Support/ai-session-viewer on macOS. The pre-rename ~/.claude-code-viewer/ and ~/.session-viewer-bookmarks.json are moved into it automatically when the desktop app or web server starts, and the old locations are removed. Recycle-bin manifests and bookmarks present in both places are merged entry by entry; for other files with the same name the newer copy is kept. If the move fails partway, the old data stays where it is and the move continues on the next start.
Bookmarks, recycle-bin manifests, and session metadata serialize read-modify-write operations and related file moves across desktop and web processes with state-write-lock.sqlite in the app directory. A write-lock wait exceeding five seconds returns an error and can be retried; do not delete this lock file while the app is running. Saves use unique temporary files in the destination directory and atomic replacement. Only missing files count as empty data; corrupt or unreadable files block writes. The lock does not coordinate external editors or provide an automatic transaction rollback across multiple data files.
