Session-Reader: A Read-Only Plane for Cross-Agent Local Sessions

Preface

Anyone who has worked with Claude Code, Codex, Grok, Antigravity, or DeepSeek Harness will sooner or later hit the same kind of problem: sessions land in jsonl files in their respective directories, with different formats and scattered paths, and when you want to find out “what that error said last time,” you have to manually flip through files. The DSH sidebar can show sessions within the current process, but when switching tools, switching machines, or simply wanting full-text search, there is still a missing layer of unified local browsing and searching.

The community plugin @1agents/session-reader (repo: scottzx/session-reader) addresses this: it opens “History Sessions” inside DSH Web, and can also be used standalone via the 1session CLI or the TypeScript library. Original session files remain on your local machine, read-only and untouched; a SQLite index accelerates search, and can be rebuilt from source files if needed.

What This Is

Maintainer: scottzx. In the DSH plugin directory it is categorized under “Memory”. npm package name @1agents/session-reader, current version 0.11.1, MIT license.

Positioning: a Read Plane — discover sessions from local raw session files, search original text, view them turn by turn, and aggregate by working directory. It does not depend on an ACP service or a resident daemon; the browsing process does not modify the original sessions.

Covered Agents and Where They Store Sessions

Sessions from five sources are normalized into the same set of event types: user / assistant / thinking / tool_call / tool_result.

Provider Typical storage location Workspace source
antigravity ~/.gemini/antigravity/brain/<uuid>/.system_generated/logs/transcript.jsonl The Cwd of run_command, etc.
claude ~/.claude/projects/<slug>/<session-id>.jsonl The cwd field of entries
codex ~/.codex/sessions/<YYYY>/<MM>/<DD>/rollout-*.jsonl The cwd of session_meta / turn_context
dsh ~/.dsh/sessions/<slug>/session-<uuid>/session.v{2,4}.jsonl[.zstd] The cwd of the opening session record
grok ~/.grok/sessions/<percent-encoded cwd>/<uuid>/chat_history.jsonl info.cwd in summary.json, etc.

DSH compresses sessions by appending zstd frames; the plugin reads the complete file frame by frame at the parsing layer. When Grok’s main conversation file lacks timestamps, time and tool results are filled in from side files in the same directory (e.g. events.jsonl, rewind_points.jsonl, updates.jsonl) according to rules.

Core Features

DSH Web

After installation, the package’s dsh.bundle.patch (also written as bundle-related patch configuration in the README) enables the plugin at install time. The sidebar provides a “History Sessions” browser; all five sources can be browsed read-only.

To continue Claude, Codex, or Grok native sessions inside DSH (not just view history), you also need to optionally install @1agents/acp-service, and configure the corresponding agent’s CLI and login while preserving the original working directory; sessions from DSH can open the original DSH session; Antigravity is currently mainly for browsing. See the repo README section “Continuing Original Sessions in DSH” for specific conditions.

CLI 1session

The same logic is available as a global command or as an npx one-off invocation, with main capabilities including:

  1. Listing and scope: list, projects (merge projects across agents, optional weekly statistics and pagination).
  2. Hierarchical view of a single session: overview (statistics and storage overview) → turns (per-turn summary) → turn (single-turn body and tool directory).
  3. Workspace aggregation: workspace aggregates across agents for the current directory; add --digest to output a unified story line.
  4. Ledger and search: jobs, commands, files, errors, search (keyword search, can use the SQLite index).
  5. Index maintenance: index builds or refreshes the local index; the global --no-index flag bypasses the index and reads source files directly.
  6. Relationship graph: graph (alias related) shows references and evidence between sessions.

Built-in skill

1session skill install can link or copy the built-in skill into each of the five agents’ own skills directory, so that agents can call the CLI themselves when users ask about “last time / before / that error”. The default is a symbolic link, so skill content updates along with the package when the global package is upgraded; if a loader does not recognize symbolic links, use --copy. The README explicitly states: do not run skill install with npx (the link will point into the npx cache, which may be cleaned up); you should first npm i -g @1agents/session-reader and then install the skill.

Installation and Activation

Environment

Node.js >= 22.15 (uses node:sqlite to build the index, and node:zlib’s zstd support to read DSH compressed sessions). DeepSeek Harness installed.

DSH Web plugin

In the terminal:

dsh plugin --profile web add @1agents/session-reader
dsh web

When running from the DSH source repo, you can prefix the above commands with pnpm; when using another profile, replace web with the corresponding name. If DSH Web is already running, you need to restart the service after installing or upgrading, then open the sidebar “History Sessions”.

As a library or standalone CLI

npm install @1agents/session-reader   # as a library
npm install -g @1agents/session-reader  # as the 1session command
npx @1agents/session-reader list      # use directly without installing

When distributing to others, the README suggests running these two lines together:

npm i -g @1agents/session-reader
1session skill install

Typical Usage

List sessions near the current working directory

The default --scope is related to the current pwd; filtering by provider and time is supported:

1session list --limit 20
1session list --scope cwd --provider codex --since 24h --json

View projects and sessions across agents

1session projects --page 1 --limit 20
1session projects --weekly --timezone Asia/Shanghai --page 1 --limit 4 --json

Repositories sharing the same Git repo / same origin are merged according to the rules in the README; directory migration can be explicitly specified with --project-map projects.json, without modifying historical files.

From session overview to a single turn

1session overview <session-id>
1session turns <session-id>
1session turn <session-id> 3
1session workspace . --since 24h --digest
1session search "TypeError" --scope cwd --limit 50
1session index --all --scope global

Before the first search, you can run index for the scope; use --force when the index is missing or needs a forced refresh.

Use Cases and Caveats

Who it’s for: developers who frequently switch between multiple CLI agents and need to uniformly query historical conversations and the command/file ledger on their local machine; users already using DSH Web who want to browse local jsonl files directly in the sidebar; teams that want to bake the “query historical sessions” capability into each agent’s skill.

Permissions and security: both the plugin and 1session read session files under directories such as ~/.claude, ~/.codex, ~/.dsh with the current user’s permissions. Before installing, review the source code and the MIT license at the GitHub repo to confirm it complies with your local data policy. Session content may contain keys, paths, and private repository information; do not casually share search results.

Relationship with the ecosystem: DeepSeek Harness adopts an “everything is a plugin” extension approach; the SkillHub directory page is a community collection site, with no official affiliation with DeepSeek / Hia.

Closing

session-reader brings the local sessions of multiple agents into a single read-only read plane: browse in the DSH Web sidebar, or use 1session in the terminal for listing, hierarchical reading, workspace aggregation, and search; the original jsonl files stay untouched, and the index can be rebuilt. For plugin documentation and screenshots, see the directory page and the repo README.

  • Directory page: https://www.skillhub.cn/plugins/scottzx/session-reader
  • GitHub: https://github.com/scottzx/session-reader
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye