Skip to content

[codex] ingest Codex session history#49

Draft
rodbland2021 wants to merge 7 commits into
masterfrom
fix/ci-mcp-openai-deps
Draft

[codex] ingest Codex session history#49
rodbland2021 wants to merge 7 commits into
masterfrom
fix/ci-mcp-openai-deps

Conversation

@rodbland2021
Copy link
Copy Markdown
Owner

Summary

  • Add Codex CLI session ingestion from ~/.codex/sessions.
  • Parse Codex response_item user/assistant messages and skip duplicate/tool/developer chatter.
  • Add Codex to local/remote watchers, quick-index scripts, health checks, docs, and tests.

Validation

  • python3 -m py_compile claw_recall/indexing/indexer.py claw_recall/config.py claw_recall/api/web.py scripts/cc_session_watcher.py
  • pytest -q tests/test_claw_recall.py::TestPathSuffix tests/test_claw_recall.py::TestSourceFileOverride tests/test_claw_recall.py::TestWatcherHelpers
  • Live reindex: ~/.codex/sessions -> 22 sessions, 1,676 messages, 0 errors
  • Runtime: restarted claw-recall-watcher; logs confirm it watches /home/clawdbot/.codex/sessions

Clawdbot and others added 7 commits April 7, 2026 06:17
Two CI failures fixed:
- Add mcp>=1.0.0 to requirements.txt so ci.yml installs it (fixes
  ModuleNotFoundError in TestMCPServer and TestBrowseRecent tests)
- Guard _get_openai_client() against missing OPENAI_API_KEY env var;
  OpenAI() raises immediately at init when the key is absent, causing
  test_batch_embed_empty to error instead of returning {"embedded": 0}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tests monkeypatch _openai_client directly to inject a MagicMock.
The early return on missing OPENAI_API_KEY blocked this — moved
the existing-client check before the env var check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant