Codex History ViewerBrowse, search, organize, and resume past Codex CLI / Claude Code sessions through the official VS Code extensions or prepared CLI commands. Latest release: 2.14.1 (2026-09-07).
Why Use This Extension?Codex and Claude Code sessions can become hard to revisit once they are no longer active in the editor. Codex History Viewer keeps those local session files useful by presenting them in a searchable session history browser inside VS Code. Use it to find past prompts, reuse useful answers, inspect file changes, organize sessions with tags and notes, resume same-source sessions, and prepare handoff context for other AI tools. Highlights
Quick Start
History and Pinned OrganizationHistory and Pinned separate project organization into display and scope controls. Display can switch between List and Project views, while scope can switch between All and Current Project Group. Project matching is case-insensitive across platforms. Project views preserve the existing layout choice: session-list history becomes Project folders can have extension-local aliases from the History or Pinned project context menu. Aliases are stored in VS Code extension state without changing Codex or Claude Code history files. When set, aliases appear in project headings, session descriptions, tooltips, filter summaries, Status, and Search scope/session display while the original path remains available in detailed metadata. Project associations can link another project's history into the current project display or group related projects together without moving the original history files. Associations are available from project context menus and are reflected in History, Pinned, Search, File AI Change History, and handoff content. History, Pinned, and History Insights can target Active Only, Active + Archived, Archived Only, Hidden Only, or All sessions when the corresponding sources are available. Hidden sessions can come from either active or archived storage. Hidden and archived states are identified in tree descriptions and tooltips. Pinned has its own project scope, source, visibility target, date, tag filters, and saved sort preference. It does not follow History/Search filter state, so saved sessions can stay focused on a different project or source while you browse and search elsewhere. History can sort by started date, last activity date, name, or source session file size. Pinned can sort by pinned time, started date, last activity date, name, or source session file size. When Tooltip Mode is set to Compact or Detailed, History and Pinned session tooltips also show the source session file size. Use Show timestamp and Show project/path under History List > Session rows to simplify session rows in History, Pinned, and Search. The two elements can be hidden independently, while their full timestamp and project information remain available in session tooltips. Session ViewerThe Session Viewer renders local session files as readable timelines. It supports Markdown, Mermaid diagrams, syntax-highlighted fenced code blocks, KaTeX-compatible math, assistant usage metadata, environment snapshots, tool execution metadata, and grouped file-change cards from patch activity. GFM task-list markers render as read-only checkboxes without modifying the stored session content. Markdown tables use clearer cell spacing and separators, wrap long content, and scroll horizontally within the table when needed. Each table has an action for copying only that table in its original Markdown form. Fenced The resume button follows the resume method selected separately for Codex and Claude Code. Extension and CLI uses a split button: the last used method becomes the main action, while the dropdown always lists both methods. CLI actions enter the resume command in a new VS Code integrated terminal without pressing Enter. The History, Pinned, and Search context menus follow the same source-specific settings. The Session Viewer shows the validated session ID and session file name with actions to copy the ID, copy the full file path, or reveal the file in its containing folder. The same actions are available under Session Information in the History, Pinned, and Search context menus. Tree context menus distinguish single-session actions from bulk actions. Resume, CLI preparation, handoff, session information, and custom-title actions always use the explicitly right-clicked session. Open, Markdown, annotation, export, pin/unpin, hide/show, promote, and delete actions use the same-view multi-selection only when it includes the right-clicked row; otherwise they use that row alone. Codex and Claude Code sessions can be mixed for these bulk actions. Archive and restore remain Codex-only and reject the whole selection when its source or archive state is incompatible. Menu availability is determined by the right-clicked row, and selections from different views are never combined. Large histories can use the Codex and Claude Code sessions can use an opt-in turn timeline. Patch group cards can show compact file summaries and an in-place Open all diffs / Close all diffs action. With the turn timeline enabled, Codex and Claude Code changes are grouped into one diff card per turn, with each changed file listed once. Request interruptions from Codex and Claude Code render as dedicated timeline cards. When available, details include reason, duration, turn ID, rollback state, and rolled-back turn count. Claude Code peer and coordinator messages received from other sessions render as dedicated cross-session cards. They remain searchable as assistant-derived content and are excluded from previews, Resume, Handoff, and human-message analysis. Session tabs preserve useful state across reload and auto-refresh, including scroll position, selected message, expanded cards/diffs, detail visibility, diff wrapping, and in-page search state. The experimental opt-in Restore Webview Tabs After Reload setting can also restore session tabs, File AI Change History, History Insights, and the dedicated settings page after Developer: Reload Window or VS Code restart. It is disabled by default because VS Code can defer Webview restoration and may occasionally create duplicate tabs when the same history is opened again. The session timeline can keep the current user prompt visible at the top while you scroll. Codex memory citation information is rendered as a collapsible section instead of being left as raw metadata in the message body. Session runtime context and local-command output are likewise shown as collapsed cards instead of raw user messages. Codex array-form tool outputs and standalone Attachments and ReferencesThe Session Viewer keeps attachments and file references out of the message body and renders them as cards instead.
SearchSearch is local, cancellable, and backed by an incremental search index. It can search message text, configured tool metadata, titles, tags, notes, and attachment metadata. Supported query forms include normal substring search, Search follows the current History target, including date, project scope, project filter, source, visibility, and tags. Hidden Only searches hidden sessions, while All searches both visible and hidden sessions. Search does not follow Pinned filters, and it does not create Search results from filters alone. The global search input combines manual search and search history. Search history is shared with in-page search in the Session Viewer and File AI Change History, stores only query text, and can be selected to run or removed individually with the trash button. Saved searches also store and reuse only query text; role filters and case sensitivity are taken from the current settings when the saved search is run, and saved searches can be removed individually from the run picker. Opening a Search result can pass the same query into the Session Viewer's in-page search. In-page search in the Session Viewer and File AI Change History supports the same query forms, including exact matching and regular expressions, and can show search-history suggestions below the search input. Project aliases are shown in Search scope and result display, but they are not added to the search index or treated as searchable hit text. The search index can be tuned with
Attachment indexing includes labels, paths, MIME types, file kinds, and bounded text from Claude Code text documents. PDF / Office / binary / base64 document contents, raw image Base64 or data URI payloads, and Codex referenced-file contents are not indexed. Codex Archived SessionsCodex History Viewer can optionally read Codex Archive and restore operations prefer the official Codex provider. Moving archived sessions back to normal Codex history can fall back to a filesystem move when the official provider is unavailable. Pins, annotations, bookmarks, and saved session positions are relocated when the session path changes. Use Hide Sessions and Show Sessions from History, Pinned, or Search to change extension-local visibility without modifying the original session file. Hiding works for sessions in both active and archived storage. Hidden sessions remain available in File AI Change History. Session Data Export and RestoreExport Sessions can save either a sanitized Markdown transcript or the original session data. Export original session data includes the provider session files and extension-managed metadata for tags, notes, custom titles, hidden state, pins, and bookmarks for messages and other timeline entries. Import Sessions can restore the session data and its metadata together, or restore only the selected part when that option is available. For Codex sessions, the active or archived storage location is also restored. A confirmation summarizes the planned session-data and metadata changes before anything is written. Handoff to Other AIHandoff actions appear under Handoff to Other AI for eligible active Codex / Claude Code sessions when After a handoff file is created, the completion notification can open the file, copy the handoff prompt, or copy the generated file's absolute path to the clipboard. Handoff files are stored in this extension's VS Code global storage and include a tail-prioritized transcript excerpt, the latest user request, the source session path, recoverable file changes, and attachment summaries. Tool calls, tool outputs, and binary attachment payloads are intentionally omitted. When project associations are configured, handoff generation follows the associated project display and includes path mapping context for the receiving AI. File AI Change HistoryFile AI Change History starts from a workspace file and shows the Codex / Claude Code changes that touched that file over time.
Use it when you want to answer questions such as:
The Explorer file context menu entry is opt-in. Enable File Change History > Explorer Context Menu: Enabled, then right-click a file in VS Code Explorer and run Show File AI Change History. The view is scoped to the current workspace and selected file. It supports Codex / Claude Code source toggles, in-page search with shared query history and richer query syntax, incremental Load more, previous/next navigation, and Open in History links back to the matching diff card in the original session. Diff code is syntax-highlighted when the language can be determined from the file path; otherwise, it is displayed as plain text. File AI Change History follows project associations when resolving related history, so associated project displays and path mappings are reflected when possible. Hidden sessions remain part of its candidate history. History InsightsHistory Insights turns the current History target into a fixed analytics snapshot. Open it from Show History Insights in the History view header or from the Command Palette.
The view includes overview metrics, an activity heatmap, breakdowns by source, model, project, and tool, the most active sessions, frequently changed files, usage details, and data quality information. The overview includes reasoning tokens and change events, and the heatmap can visualize reasoning tokens. Tool breakdowns can switch between call count and session count. Most-active-session rankings can switch between user requests, tool calls, reasoning tokens, total tokens, and changed lines, and each available row can open its session. Usage details summarize cached, cache-read, and cache-creation input tokens (including Codex cache-write input tokens) and reasoning tokens; user requests, assistant responses, developer messages, tool calls, and tool outputs; all, completed, interrupted, and rolled-back turns; and changed file types by distinct-file and change-event count. Partial logs are shown as confirmed lower bounds or unavailable values instead of being treated as exact zeros. Reaggregate updates changed sessions while keeping the same target set. Apply History filters replaces the snapshot with the current History target. The filter panel can refine source, date range, visibility target, related project groups, and tags. These changes stay inside History Insights by default; they update the History view only when Also apply to History is selected before applying them. Selecting a date cell opens its sessions in History. The History and Search actions on each project row apply that project while preserving the other snapshot conditions. The Search action reruns the current search when one is available, then opens the Search view. Frequently changed file entries can open the existing File AI Change History view or the corresponding workspace file. Agent Runs (Experimental)Agent Runs currently supports Codex sessions only. When it is enabled and its relationship data is ready, sub-agent sessions with an available parent are omitted from History. They remain reachable from the parent session's Agent Runs panel, Search, and explicit Pinned entries. Sub-agent sessions whose parent cannot be resolved safely remain visible in History.
The Agent Runs action in a Codex session view opens a right-side relationship tree containing the parent, siblings, and descendants of the current session. The current route is blue, other agent routes are orange, and the open icon on each available node opens that related session directly. Enable Branch Navigation (Experimental)Branch Navigation recognizes locally forked Codex session histories, including histories created with Fork locally in the Codex app or Continue in new task in the Codex extension, and Claude Code histories created with Fork conversation. It lets you move between Fork destinations without leaving their respective session views.
Inline controls at a Fork point switch to the previous or next route. The shared route-tree action shows the shared history, Fork points, and the start and end of each route. Selecting a route node switches the same session view to the corresponding stored session and message position. Enable ConfigurationRun Open Settings from Control or the Command Palette to open the categorized settings page. Settings can be edited at the User, Workspace, or Workspace Folder level when supported by their scope. The Maintenance page can reset managed user settings, export or import scope-specific JSON settings backups, rebuild the history cache or search index, run cleanup actions, and open the standard VS Code settings for advanced editing. Common settings include:
Suggested SettingsThe defaults are designed for regular use. These settings are useful starting points when you want a lighter UI, richer search, or more active refresh behavior:
If history, search, or analysis results look stale, run Open Settings > Maintenance > Rebuild Cache or Control > Rebuild Cache. After confirmation, it recreates the history cache, search index, and analysis data. A successful Rebuild Cache refreshes open History Insights and Branch Navigation only when its starting configuration is still current. CommandsMost actions are available from view title buttons and tree context menus. For the primary user-facing commands with descriptions, see: Codex Integration Notes
What's New in 2.14.1
Related history, search, and analysis caches are rebuilt for question-and-answer support. With large histories, the first history load, search, or analysis after updating may take longer. ChangelogSee CHANGELOG. SecuritySee SECURITY for details. Use Codex History Viewer v2.13.0 or later. Do not install or redistribute v1.2.1 or earlier VSIX files. PrivacyThis extension reads local session files and renders them inside VS Code. For Claude Code sessions in the standard local project layout, it can also read matching entries from Buttons for GitHub, GitHub Sponsors, and project resources open fixed GitHub pages in your external browser only when selected. The extension does not add session content or local paths to those URLs. If you use Copy Quick Prompt or Copy Handoff Prompt to Clipboard, this extension copies session context to your clipboard. Data is only sent externally if you paste it into another tool or extension. When you open a session as a Markdown transcript, the generated transcript includes local paths such as the session file path and CWD. Review before sharing. Settings backup JSON files exported from the Maintenance page may contain configured local folder paths. Workspace- and folder-scoped backups may also contain the current workspace or selected folder's absolute path or URI in target metadata. Review them before sharing. Project ScopeCodex History Viewer is intentionally local-first. Features that cannot be implemented using only locally available session data and require the extension to access external services over the network are outside the project scope. The extension will not request, store, or use sign-in credentials such as account IDs, passwords, API keys, or access tokens. This includes, for example, live lookups of account quota, subscription status, billing information, and costs. Features that require continuously updated provider pricing or account-plan data are also outside the project scope, even when authentication is not required. Supported ProvidersCodex History Viewer currently focuses on Codex and Claude Code session history. Support for additional providers may be considered in the future at the maintainer's discretion, and only when they can be routinely used, tested, and maintained by the maintainer over the long term without compromising the extension's quality, compatibility, or security. DisclaimerCodex History Viewer is an independent project and is not affiliated with, endorsed by, or officially associated with OpenAI, Anthropic, Codex, or Claude Code. This extension works with locally stored session and history files created by official tools and extensions. Their file formats and internal behaviors may change without notice, which may affect compatibility. Archive, restore, delete, import, and other file operations are designed to be conservative, but they may move or modify local files and extension-managed metadata. The author and contributors cannot guarantee recovery of lost or corrupted data. Please keep backups of important session data. |




