| name | codex-chat-search |
|---|---|
| description | Search local Codex conversation history on disk and identify the most likely past session by date, thread name, remembered phrases, or topic hints. Use when the user asks to find, locate, recover, identify, or search a previous Codex chat, session, or conversation from local history. |
Search only local Codex history under ~/.codex.
Prioritize fast narrowing by date and thread_name, then inspect matching session files to produce a simple answer.
The bundled script is offline-only and should not send conversation contents outside the machine.
- Infer as many search hints as possible from the current conversation before asking anything.
- Treat
today,yesterday, and similar phrases as exact calendar dates before searching. - Search
session_index.jsonlfirst. - Use session JSONL files under
sessions/andarchived_sessions/to enrich or recover candidates when the index is insufficient. - Prefer evidence from user messages over diffs, logs, long code blocks, and developer instructions.
- Return the best matches in a simple format with:
- conversation name
- date and time
- date and time of the last user message
- short description
Ask the user one concise question about what the conversation was about only if the current thread does not already provide enough usable hints such as:
- approximate date
- remembered phrase
- topic
- file, tool, or repo mentioned
If you ask, request the smallest missing clue.
Keep the final answer simple. For each candidate, provide:
NombreFechaUltimo mensaje usuarioDescripcion
Include the local file path only when it materially helps disambiguate or when the user asks for it.
Use script --verbose output when path, score, or match reasons are needed for disambiguation.
Use the bundled script first:
python scripts/find_codex_conversations.py --query "reescalar imagenes" --date 2026-04-21 --jsonUseful variations:
python scripts/find_codex_conversations.py --query "assembly" --max-results 5 --json
python scripts/find_codex_conversations.py --date 2026-04-21 --query "raw" --query "imagen" --json
python scripts/find_codex_conversations.py --date-from 2026-04-20 --date-to 2026-04-21 --query "resume" --json
python scripts/find_codex_conversations.py --query "imagenes" --verbose- Give the highest weight to exact phrase matches in
thread_name. - Next prefer exact phrase matches in user-authored messages.
- Then use token matches in
thread_name, first user message, and later user messages. - Treat accented and unaccented text as equivalent for search matching.
- Use date filters early to reduce noise.
- If the user says the chat was from Codex, do not search outside local Codex history.
scripts/find_codex_conversations.py: searchsession_index.jsonlandsessions/**/*.jsonl, score candidates, and emit structured results.
references/codex-history-layout.md: local history locations and file roles.references/search-playbook.md: fallback tactics for weak or ambiguous search hints.