Skip to content

Introduction

agent-sessions is an interactive terminal UI (TUI) tool for browsing, searching, and resuming sessions from various AI CLI agents.

While tools like Claude Code, Gemini CLI, OpenAI Codex, and Cursor provide ways to resume sessions, browsing and searching through your history can be challenging. This tool provides a unified interface for all of them.

demo

Why?

  • You have dozens (or hundreds) of AI agent sessions across different tools
  • You want to find that conversation from last week about the auth refactor
  • You want to clean up old sessions cluttering your hidden directories
  • You don't want to manually copy-paste session IDs or project hashes

Supported Agents

AgentStoreFormatResume Command
Claude~/.claude/projects/JSONLclaude --resume
Gemini~/.gemini/tmp/JSON/JSONLgemini --resume
OpenAI Codex~/.codex/sessions/JSONLcodex resume
Cursor~/.cursor-agent/sessions/JSONLagent --resume

Features

FeatureDescription
Agent SelectorChoose your AI agent upon startup or switch anytime
BrowseAll sessions sorted by most recent
MetadataDate, project, git branch, message count, first message preview
PreviewPeek into a session's conversation before resuming
SearchLive filter across project, branch, and message text
ResumeLaunch the agent's resume command with one keypress
DeleteRemove old sessions with confirmation
fzf modeAlternative selection via fzf for power users

Tech Stack

  • TypeScript with strict mode
  • Ink (React for the terminal) for the TUI
  • Commander for CLI argument parsing
  • Hexagonal architecture with a Provider-based system for multi-agent support
  • Vitest for testing

Requirements

  • Node.js 20+
  • At least one supported AI CLI agent installed
  • fzf (optional, for --fzf mode)

Released under the MIT License.