Skip to content

feat: Codex CLI integration — MCP config + lifecycle hooks#232

Merged
buildingjoshbetter merged 1 commit into
mainfrom
feat/codex-integration
May 11, 2026
Merged

feat: Codex CLI integration — MCP config + lifecycle hooks#232
buildingjoshbetter merged 1 commit into
mainfrom
feat/codex-integration

Conversation

@buildingjoshbetter
Copy link
Copy Markdown
Owner

Closes #182

Summary

  • CodexAdapter (truememory/hooks/adapters/codex.py): Full CLIAdapter implementation for Codex CLI with detection, TOML-based MCP registration ([mcp_servers.truememory]), and hook registration ([[hooks]] entries)
  • Three hook events: SessionStart (10s), Stop (5s), UserPromptSubmit (5s) — same scripts as Claude Code, different config format
  • AGENTS.md support: System prompt path and content adapted from CLAUDE_TEMPLATE.md
  • Additive config merges: MCP + hooks both in ~/.codex/config.toml, existing entries preserved

Test plan

  • All new tests pass (tests/test_codex_adapter.py)
  • All existing tests still pass
  • uvx ruff check passes — no lint errors
  • Import chain verified — no circular imports
  • Interface compliance: all 11 CLIAdapter abstract methods implemented
  • Idempotent install: running twice produces identical config
  • Uninstall removes only TrueMemory entries
  • Python 3.10 compatible (no bare import tomllib)

Add CodexAdapter with TOML-based MCP server registration and hook
installation. Same JSON stdin/stdout protocol as Claude Code — reuses
existing hook scripts. Includes AGENTS.md system prompt support.
@buildingjoshbetter buildingjoshbetter merged commit 51173ac into main May 11, 2026
14 checks passed
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.

feat: Codex CLI integration — MCP server config + lifecycle hooks

1 participant