Skip to main content

Read and search Codex CLI and Claude Code chat history from the terminal.

Project description

agent-chat-reader

Read and search Codex CLI and Claude Code chat history from the terminal.

Useful for AI agents that need to recall what was discussed or decided in past sessions, without manually parsing noisy JSONL files.

Install

uv tool install agent-chat-reader

Or for development:

git clone https://github.com/alik-git/agent-chat-reader
cd agent-chat-reader
uv sync --extra dev
uv run agent-chat-reader --help

Usage

List recent sessions (both Codex and Claude Code, sorted by recency):

agent-chat-reader --list

Search across all sessions for a keyword:

agent-chat-reader --find "sim2sim"
agent-chat-reader --find "policy_interface" --source codex

Read a specific session by UUID prefix:

agent-chat-reader 019eaecb
agent-chat-reader 1bfc739b --verbose     # include tool call summaries
agent-chat-reader 019eaecb --tail 5      # last 5 user turns only

What it filters out

The raw JSONL files are very noisy. This tool extracts only:

  • Codex: user_message events, agent_message events, and full response_item assistant text. Guardian/subagent sessions (auto-approval bots) are hidden by default.
  • Claude Code: real user turns (not tool-result carriers), and assistant text blocks (not thinking blocks or tool calls). Sidechain sub-agent turns are hidden by default.

Use --include-subagents to see everything.

Options

Flag Description
--list / -l List recent sessions from both sources
--find KEYWORD / -f Search all sessions for a keyword
--source codex|claude Filter to one source
--verbose / -v Include brief tool call summaries (Claude sessions)
--tail N / -n N Show only the last N user turns of a session
--include-subagents Include guardian/subagent sessions
--limit N Max sessions shown by --list (default: 40)

Session storage locations

Agent Path
Codex CLI ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
Claude Code ~/.claude/projects/*/*.jsonl

Development

uv run ruff format --check .
uv run ruff check .
uv run mypy
uv run pytest
uv build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_chat_reader-0.1.0.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_chat_reader-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file agent_chat_reader-0.1.0.tar.gz.

File metadata

  • Download URL: agent_chat_reader-0.1.0.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_chat_reader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3f20a097416ae16999f65f9fb1c2ddd19bc1b0abdd63e0c9d4f59d413e5c4aae
MD5 afef784c0dbdf3b705387d30a4cc7cb4
BLAKE2b-256 68a024dfea17c00fcdb0fb72e2f97d22c074ff404c95e9cf01f7a84844fb0ce9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_chat_reader-0.1.0.tar.gz:

Publisher: release.yml on alik-git/agent-chat-reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_chat_reader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_chat_reader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f91c632dd595f7ad734ed24fb9a127816f770488cc9c57b724b2c198e9fcd08b
MD5 b00921037ed6994efca3220898f6e4ef
BLAKE2b-256 9c8a0bea3187cf470a0e4c7a1c3073f7a7df792e6e97c148fb5e5311eb35f513

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_chat_reader-0.1.0-py3-none-any.whl:

Publisher: release.yml on alik-git/agent-chat-reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page