Codex Session Picker · Interactive CLI to find & resume OpenAI Codex sessions fast.
Install · Usage · Troubleshooting · License
codexr is a tiny helper that scans ~/.codex/sessions and presents an
interactive list (via fzf)
showing timestamp, line count, size, and the full path of each .jsonl
session. Choose with the arrow keys and hit Enter—we'll invoke:
codex -c experimental_resume="/full/path/to/rollout-....jsonl"If fzf isn't installed, codexr falls back to a non‑interactive mode where you can
resume the N-th newest session (default: newest).
- Bash (>= 4)
- GNU
find,awk,wc,date - OpenAI Codex CLI installed & configured
- Optional (recommended): fzf
Install fzf on Debian/Ubuntu:
sudo apt update && sudo apt install -y fzfgit clone https://github.com/<your-username>/codex-session-picker.git
cd codex-session-picker
chmod +x install.sh
./install.sh
# Then reload your shell
source ~/.bashrc # or: source ~/.zshrcThis adds the codexr function to your shell profile.
Interactive picker (fzf):
codexrFallback (no fzf): resume the N‑th newest session (1 = newest):
codexr 2 # resume the 2nd newest
codexr 5 # resume the 5th newestNo sessions found
Ensure files exist under ~/.codex/sessions/**/rollout-*.jsonl.
date -d not supported
The script uses GNU date. On macOS, install coreutils (brew install coreutils).
Change preview content
Edit codexr.sh and modify the --preview command (e.g. tail -n 60 → head -n 50).
codexr.sh: main function & listing logicinstall.sh: appends a small source block to your shell rc fileassets/banner.png: repository bannerdocs/demo.png: replace with a screenshot of your terminal

