Open session format · Apache-2.0

The Missing IR for Agent Sessions

Toolpath is an open, versioned format for coding-agent sessions. Parse any agent’s session in, project it out to any harness, and build your tools once for all of them.

Read the spec Install path →

Every agent writes its own private log

FIG_001 · Where sessions live today
Claude Code
~/.claude/projects/…/*.jsonl, rotating chains
Codex CLI
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
Gemini CLI
~/.gemini/tmp/…, chat directories
Pi
~/.pi/agent/sessions/
Copilot, Cursor, opencode
their own layouts again

None of these are documented, and any of them can change in the next release. The session that produced a change is locked inside the harness that ran it.

Whoever owns the format owns the record. Switching tools, auditing a change, or building your own tooling all depend on a file layout you don’t control.

Parse in, project out

Toolpath is a stable center with every agent at the edge. Harness formats are undocumented and change without notice, so Toolpath treats them as boundaries, and everything it does is one of three moves across them.

FIG_002 · One center, every edge
  • Claude Code
  • Codex CLI
  • Gemini CLI
  • opencode
  • Pi
  • Copilot CLI
  • Cursor
parse in
Toolpath document steps who changed what meta.intent why dead ends what was tried usage what it cost
project out
  • Claude Code
  • Codex CLI
  • …any writable agent
  • path query
  • Pathbase
  • your tool

Build it once

One schema means tooling stops being per-agent. Build against the format and it works with sessions from every supported harness. When the next agent ships, one new parser brings it into every tool you already have.

Query every session

path query runs one jq filter across every session on the machine, whichever agent wrote it.

Resume anywhere

path resume --harness codex moves a Claude Code session into Codex: the intent, the state, and the dead ends already ruled out.

Archive and search

path p cache sync keeps every session on the machine, incrementally, in one format that won’t rot when an agent changes its log.

Built on Toolpath: Pathbase

Pathbase stores, shares, and resumes sessions in Toolpath. Link one from a PR and reviewers see what was asked, tried, and rejected.

Built to be depended on

Apache-2.0

The format, the path CLI, and every crate.

Versioned kinds

Kinds are immutable and semver-versioned. A revision ships at a new URI, and documents written against an old one stay valid.

Open to contributions

Parser crates for new agents and proposals for the schema are welcome from anyone, not just Empathic.

A published spec

An RFC, a JSON Schema, and example documents. Implement it in any language.

Supported agents

Parsing captures the full session: prompts, tool calls, reasoning, file changes, sub-agent work, token usage. Projecting writes a session the harness accepts as its own, so it resumes natively. Where a harness’s log doesn’t record something, the format notes say so.

Git history and GitHub pull requests parse into the same schema, so a session, the PR it became, and the release that shipped it can share one graph.

Start with the sessions already on your machine

Quick install the path CLI
$ curl --proto '=https' --tlsv1.2 -fsS \ https://toolpath.net/install.sh | bash
From crates.io
$ cargo install path-cli
# Archive every agent session on this machine (all harnesses, incremental)
path p cache sync

# Output tokens by model, across every session, whichever agent produced it
path query 'group_by(.step.actor) | map({actor: .[0].step.actor, output_tokens: ([.[].change[]?.structural.token_usage.output_tokens // 0] | add)})'

# Share a session, then resume it in the original harness or a different one
path share
path resume https://pathbase.dev/alex/pathstash/path-pr-42 --harness codex

Go deeper

Read the spec

Start with the format at a glance: the shape of a document, the step DAG, and how it compares to git. Then the RFC for the normative details.

Build on the crates

Everything the CLI does is a library call: core types, a provider crate per harness, renderers for DOT and Markdown. See the crates or the API reference.

Stay in Claude Code

/plugin install path@toolpath adds /path:share and /path:query as slash commands and installs the CLI on first use. See the plugin.