Codex Session Console is a local desktop-style manager for Codex CLI sessions.
It reads the session data stored under ~/.codex and presents it as a searchable UI where you can continue, classify, rename, delete, restore, and export conversations.
- Shows existing and deleted Codex sessions in one local interface.
- Groups sessions by project or custom class.
- Lets you set a display title without overwriting the original Codex title.
- Lets you move a session into a custom class without changing its real working directory.
- Opens selected existing sessions from the UI.
- Deletes, permanently deletes, and restores sessions when recovery data exists.
- Exports session lists as
TXTorJSON. - Creates backups before high-impact write operations.
- macOS or Linux
python3lsof- Local Codex data in
~/.codexif you want to see real sessions
If Codex is not installed, or if no session data exists, the app can still open. The list will simply be empty.
Run this from the project directory:
./tools/install_mac_app.shThis creates:
~/Desktop/Codex Session Console.app
You can move the app to Applications or keep it on the Desktop. If the project folder is moved later, run the installer again so the app points to the new path.
Run:
./tools/install_linux_app.shThis creates:
~/.local/bin/codex-session-console~/.local/share/applications/codex-session-console.desktop~/Desktop/Codex Session Console.desktopwhen a Desktop folder exists
Some Linux desktops require you to right-click the .desktop file and choose an option such as Allow Launching before double-clicking works.
Start the UI and open the browser:
python3 app.py --openStart only the local server:
python3 app.pyDefault address:
http://127.0.0.1:8876
The project root also includes a macOS launcher:
Launch Codex Session Manager.command
Double-click it to start the local service and open the page.
The top-right controls provide:
- Theme switcher
- Refresh
- Quick command menu
Search matches:
- Session ID
- Custom title
- Codex title
- Project path
- Class name
- First user message
The left panel controls the session group shown on the right.
全部会话shows every session.Default Classrepresents sessions opened from your home directory.- Project groups come from the original Codex
cwd. - Custom classes are created from the row action menu.
- Empty custom classes are hidden automatically after their last session is moved away.
Custom class data is stored here:
~/.codex/session_manager_classes.json
Changing a class does not change the original Codex working directory.
The right panel has two status views:
可继续: sessions whose rollout file still exists已删除: sessions whose current rollout file is missing
Columns:
ID: shortened session ID, with a copy button for the full ID时间: session creation time; hover to see last opened time内容: original Codex title or content summary标题: your display title操作: row actions
Status dots:
- Green: session can still be continued
- Yellow: deleted and recoverable
- Red: deleted and not recoverable
Click ··· on an existing session.
Available actions:
打开对话: opens the selected session in a local terminal改标题: sets the display title shown in the标题column改分类: moves the session into an existing project/class or a new custom class
Display titles are stored in:
~/.codex/session_index.jsonl
The original Codex title remains visible in the 内容 column.
In the 可继续 view:
- Select multiple sessions
- Open selected sessions
- Delete selected sessions
In the 已删除 view:
- Select multiple sessions
- Permanently delete selected sessions
- Restore a recoverable session from backups
Non-recoverable deleted sessions are cleaned automatically after 30 days. The timer starts when this app first sees the session as deleted and non-recoverable, not from the original conversation creation time.
Export text:
python3 app.py export txtExport JSON:
python3 app.py export jsonThe UI also has 导出 TXT and 导出 JSON buttons.
The app reads local Codex data from:
~/.codex/state_5.sqlite~/.codex/session_index.jsonl~/.codex/history.jsonl~/.codex/sessions/...
The app writes its own management data to:
~/.codex/session_index.jsonl~/.codex/session_manager_classes.json~/.codex/session_manager_deleted.json~/.codex/session_manager_backups/
Before write operations such as delete, restore, permanent delete, and title changes, the app creates backups when the underlying Codex data may be affected.
Backup folder:
~/.codex/session_manager_backups/
Recoverability depends on whether both metadata and the original rollout file exist in backup data.
- Setting a display title does not overwrite the original Codex title.
- Setting a custom class does not modify the original project path.
- Delete operations create backups before changing Codex metadata.
- Permanent delete removes matching data from current Codex records and stored manager backups.
- Automatic cleanup only removes deleted sessions that are already non-recoverable for 30 days.
- Damaged or incomplete backup files are skipped instead of blocking current operations.
Restart the local service by closing the app and opening it again. If a browser tab still shows an old page, refresh http://127.0.0.1:8876.
Check:
python3is installed- The project folder still exists at the path used during installation
Reinstall:
./tools/install_mac_app.shCheck:
python3is installedlsofis installedxdg-openis available if automatic browser opening is expected- The project folder was not moved after installation
Reinstall:
./tools/install_linux_app.shCommon causes:
- Codex has not been used on this machine
~/.codexdoes not exist- The current user cannot read the Codex data files
Single-session restore requires both:
- Session metadata
- The original rollout file
If either part is missing, the session is shown as non-recoverable. Non-recoverable deleted sessions remain visible for 30 days after first detection, then the app removes their remaining metadata automatically.
app.py CLI entry point
config.py Paths, timezone, and theme settings
models.py Shared data models
codex_store/ Codex data reading, writing, backup, restore, delete logic
web/ Local HTTP server, HTML, CSS, and browser-side scripts
tools/ Run and install scripts
macos/ macOS app template and icon
linux/ Linux desktop launcher template and icon
docs/screenshots/ README screenshots
Before committing changes, run:
python3 -m py_compile app.py config.py models.py codex_store/*.py web/*.py web/style_sections/*.py
python3 -m unittest discover -s tests
bash -n tools/run_local_ui.sh
bash -n tools/install_mac_app.sh
bash -n tools/install_linux_app.sh
git diff --check


