Skip to main content
The Crosmos Codex plugin adds persistent project context to the OpenAI Codex CLI. It recalls relevant context before each prompt and captures completed exchanges after the assistant finishes a turn through Codex lifecycle hooks. MCP is optional. Use it when you need callable Crosmos memory tools in another MCP client. See the MCP overview.

Prerequisites

  • OpenAI Codex CLI
  • Node.js 20 or later
  • A Crosmos API key from the Crosmos Console
  • Access to at least one Crosmos memory space
Keys use the csk_ prefix.

Install

The installer asks for your API key and lets you select a memory space. Existing verified credentials are reused when available. You can select a space explicitly:
The installer can also install these optional Codex skills:
  • $crosmos-status
  • $crosmos-recall
  • $crosmos-save
Restart Codex after installation. If the hooks are not active, open Codex and approve or enable the registered Crosmos hooks when prompted.
Codex’s default workspace-write sandbox can block outbound API requests from automatic hooks and installed skills. Enable network access in ~/.codex/config.toml, then restart Codex. See the Codex advanced configuration.

Authentication

The installer stores verified credentials and the selected memory space in ~/.crosmos/credentials.json. Set CROSMOS_API_KEY to override saved credentials.

Verify

The status command checks the API connection, selected memory space, hook runtime, hook registration, and managed skills. If recall or capture is not running after a successful install, inspect the hooks in Codex and confirm that they are approved.

How it works

The plugin uses Codex lifecycle hooks and the Crosmos SDK. Memory failures do not block your Codex session. Use the optional skills when you want direct control:
  • $crosmos-status — check Crosmos configuration and connectivity.
  • $crosmos-recall — search selected-space memory on demand.
  • $crosmos-save — submit one private memory for ingestion.
Automatic recall still runs before every prompt, and automatic capture runs after completed turns.

Commands

What gets installed

Configuration

Environment variables override saved credentials where applicable.

Troubleshooting

Check the connection

If authentication or the selected space is unavailable, run installation again with a valid API key and, when needed, --space <space-id>.

Hooks are not running

Restart Codex, then inspect its hook controls and approve or enable the Crosmos registrations. Confirm that status reports the runtime and hooks.json as installed.

Enable diagnostics

Uninstall

Uninstall removes the Crosmos hook registrations, managed runtime files, and managed skills. It preserves your credentials and remote memories.

Next steps

MCP

Connect Crosmos memory tools to AI clients when you need callable tools.

Memory tools

See the callable memory tool schemas.

GitHub repository

Browse the source code, releases, and issues.