Agent Session Bridge banner
bohdanpodvirnyi bohdanpodvirnyi

Agent Session Bridge

AI community

Description

Bridge local AI coding sessions between Pi, Claude Code, and Codex.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Agent Session Bridge

[![CI](https://github.com/bohdanpodvirnyi/agent-session-bridge/actions/workflows/ci.yml/badge.svg)](https://github.com/bohdanpodvirnyi/agent-session-bridge/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![npm version](https://img.shields.io/npm/v/agent-session-bridge.svg)](https://www.npmjs.com/package/agent-session-bridge)

Local-first session portability for Pi, Claude Code, and Codex.

`agent-session-bridge` mirrors resumable conversations between the three local coding agents so you can start in one tool, switch tools in the same folder, and keep going from the same thread.

![Agent Session Bridge demo](./docs/images/demo-three-agents-v2.png)

https://github.com/user-attachments/assets/d1b151a4-78e9-42ef-98ee-bb5045809f51

Why

Each agent stores sessions in a different place and in a different format:

  • Pi uses session trees in ~/.pi/agent/sessions
  • Claude Code uses JSONL transcripts in ~/.claude/projects
  • Codex uses rollout event logs in ~/.codex/sessions

This project sits between them and keeps those local stores in sync.

The goal is simple:

  1. talk to Pi in a repo
  2. open Claude Code or Codex in that same repo
  3. resume the same conversation instead of starting over

What Makes It Different

This repo is not a session viewer, a skills sync, or a live agent-to-agent bridge.

It is focused on one job:

  • parse native session formats
  • convert them into the other tools' native formats
  • keep replay-safe mirror state on disk
  • repair older imported sessions when history got messy

The distinctive angle is `local-first durability`.

  • The bridge writes directly into each tool's own session store.
  • The CLI installs self-contained runtime assets into ~/.agent-session-bridge/runtime.
  • Sync, repair, and validation are all built around real local agent behavior.

Install

Public npm install:

npx agent-session-bridge setup
npx agent-session-bridge doctor