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_messageevents,agent_messageevents, and fullresponse_itemassistant 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_chat_reader-0.1.2.tar.gz.
File metadata
- Download URL: agent_chat_reader-0.1.2.tar.gz
- Upload date:
- Size: 41.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cbdd8ab429e05293cd1fef60678a02e9b7f138167149f6db0e05908d3959f19
|
|
| MD5 |
1ca7bbd5f61e4701bdc4aff5d33788f2
|
|
| BLAKE2b-256 |
2431cad956cb38b8a78526d97c85244b2c8f05b80a47405e8c023fa7e8a5eb90
|
Provenance
The following attestation bundles were made for agent_chat_reader-0.1.2.tar.gz:
Publisher:
release.yml on alik-git/agent-chat-reader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_chat_reader-0.1.2.tar.gz -
Subject digest:
3cbdd8ab429e05293cd1fef60678a02e9b7f138167149f6db0e05908d3959f19 - Sigstore transparency entry: 1792098600
- Sigstore integration time:
-
Permalink:
alik-git/agent-chat-reader@6a92985108352c0da71e87b667668a1446108749 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/alik-git
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6a92985108352c0da71e87b667668a1446108749 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_chat_reader-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agent_chat_reader-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93585c7edabc92327ab296b0da827c3dc6c730975808ae54255fa599ac9f1a7c
|
|
| MD5 |
0cd608f54cefcbff0cbbdbfc2b1647a2
|
|
| BLAKE2b-256 |
bfc50c94302123eea453624fea61e013e59c3948516348ef50d7cb75b323e7ce
|
Provenance
The following attestation bundles were made for agent_chat_reader-0.1.2-py3-none-any.whl:
Publisher:
release.yml on alik-git/agent-chat-reader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_chat_reader-0.1.2-py3-none-any.whl -
Subject digest:
93585c7edabc92327ab296b0da827c3dc6c730975808ae54255fa599ac9f1a7c - Sigstore transparency entry: 1792098647
- Sigstore integration time:
-
Permalink:
alik-git/agent-chat-reader@6a92985108352c0da71e87b667668a1446108749 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/alik-git
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6a92985108352c0da71e87b667668a1446108749 -
Trigger Event:
release
-
Statement type: