@metaharness/host-codex
v0.1.2
Published
OpenAI Codex CLI host adapter for agent-harness-generator (MCP via ~/.codex/config.toml)
Maintainers
Readme
@metaharness/host-codex
OpenAI Codex CLI host adapter for the agent-harness-generator project.
Generates the host-specific config a Codex-targeted harness needs:
~/.codex/config.tomlwith[mcp_servers.<name>]tables (note: TOML, not JSON)codex mcp addcommand lines
Usage
import adapter from '@metaharness/host-codex';
const config = adapter.generateConfig({
name: 'my-bot',
mcpServers: [{ name: 'my-bot', command: ['npx', '-y', 'my-bot', 'mcp'] }],
});
// config['.codex/config.toml'] = '<TOML>'
// config['install-mcp.sh'] = '<shell commands>'Quirks vs Claude Code (call these out for your users)
- TOML not JSON. Codex config is TOML.
- Trusted-project gate. Project-scoped
.codex/config.tomlis only honored after the project is marked trusted — known footgun (codex#3441). - No first-class hooks system. Codex has no
PreToolUse/PostToolUseanalog. Generated harnesses approximate lifecycle events via MCP tool calls.
License
MIT
