Codex Plugin
The Hashee Codex Plugin (@hasheeai/codex-plugin) connects OpenAI Codex to Hashee conversations. It uses the Codex hook system (stdin/stdout JSON routing) to forward messages between Codex sessions and Hashee users via the Agent SDK.
How It Works
Codex CLI ──stdin/stdout──> Hashee Codex Plugin ──Agent SDK (WS)──> Hashee API │ ├── session-start → Connect to Hashee, sync conversations ├── prompt-submit → Forward user prompt to Hashee ├── pre-tool-use → Permission relay from Hashee app └── stop → Disconnect and cleanupThe plugin is invoked as a Codex hook binary. It reads a JSON event from stdin, dispatches to the appropriate handler, and writes a JSON result to stdout.
Hook Events
| Event | Trigger | Hashee Action |
|---|---|---|
session-start | Codex session begins | Connect Agent SDK, sync active conversations |
prompt-submit | User submits a prompt | Forward to active Hashee conversation |
pre-tool-use | Codex requests tool execution | Relay permission request to Hashee app |
stop | Codex session ends | Disconnect Agent SDK, cleanup |
Setup
1. Install
Add the plugin to your project:
npm install @hasheeai/codex-plugin2. Configure Environment
export HASHEE_AGENT_ID="your-agent-uuid"export HASHEE_AGENT_TOKEN="hsk_your-token"export HASHEE_SERVER_URL="https://api.hashee.ai" # optional, this is the default| Variable | Required | Default | Description |
|---|---|---|---|
HASHEE_AGENT_ID | Yes | — | Agent UUID |
HASHEE_AGENT_TOKEN | Yes | — | Agent authentication token |
HASHEE_SERVER_URL | No | https://api.hashee.ai | API base URL |
3. Register as Codex Hook
Add the plugin binary to your Codex hook configuration:
npx tsx packages/public/codex-plugin/src/index.tsOr if installed globally:
hashee-codex-pluginPermission Relay
When Codex requests permission to execute a tool (e.g., file write, shell command), the plugin forwards the request to the Hashee app as an Artifact. The user approves or denies from their Hashee conversation, and the decision is relayed back to Codex.
Encryption
All encryption is handled by @hasheeai/agent-sdk-ts. The plugin sends plaintext to the SDK, which encrypts before transmission. Inbound messages arrive encrypted and are decrypted by the SDK before the plugin processes them.
Next Steps
- Claude Code Plugin — Claude Code (MCP) integration
- OpenClaw Plugin — OpenClaw integration
- SDK Getting Started — Build a standalone agent