Project-Level Configuration

Tracing is always configured per-project. Each project traces to its own Infinium agent:

cd /path/to/project-a
infinium-codex init
# Enter Project A's Agent ID and Secret

cd /path/to/project-b
infinium-codex init
# Enter Project B's Agent ID and Secret
LocationContents
.infinium/config.json in project rootAgent ID, base URL, trace granularity
.codex/hooks.json in project rootCodex hook registration (per-event entries with "command" pointing at the connector)
~/.codex/config.tomlcodex_hooks feature flag (user-level, set once)

Add .infinium/ to your .gitignore to keep credentials out of version control.

Resolution Order

When a hook fires, the connector resolves credentials in this order:

  1. Project config.infinium/config.json at or above the working directory (the connector walks the directory tree, like git finding .git/)
  2. Environment variables — Override project config (for CI/Docker)

Credential Storage

DataStorageSecurity
Agent IDConfig file (JSON)Non-sensitive identifier
Agent SecretOS keyringEncrypted by the operating system
Base URLConfig file (JSON)Non-sensitive

The connector never stores your agent secret in a file. It uses the OS keyring:

  • Windows: Windows Credential Manager
  • macOS: Keychain
  • Linux: Secret Service (GNOME Keyring, KDE Wallet)

Updating Credentials

infinium-codex update-credentials

Or pass flags directly:

infinium-codex update-credentials --agent-id "new-id" --agent-secret "new-secret"

Pause and Resume

Temporarily disable tracing without removing your configuration:

# Pause — hooks stay installed but traces are skipped
infinium-codex pause

# Resume — traces start sending again
infinium-codex resume

Check current state with infinium-codex status.

Trace Granularity

Codex CLI has no SessionEnd event. The connector flushes traces on the Stop event (end of each turn). You can still choose:

  • Per-turn (default) — each assistant response produces its own trace
  • Per-session summary — a single trace per session, via a stale-session timer
  • Both — per-turn traces and a session summary on cleanup

Change this during init or via the env vars below.

Environment Variables

All settings can be overridden with environment variables. This is useful for CI/CD, Docker, or headless environments where the interactive wizard can’t run.

Credentials

VariableDescriptionDefault
INFINIUM_AGENT_IDAgent IDFrom config file
INFINIUM_AGENT_SECRETAgent secretFrom OS keyring
INFINIUM_BASE_URLAPI base URLhttps://platform.i42m.ai/api/v1

Connector Behavior

VariableDescriptionDefault
CONNECTOR_QUIETSuppress output (true/false)false
CONNECTOR_FLUSH_ON_STOPSend trace after each turntrue
CONNECTOR_FLUSH_ON_SESSION_ENDSend a session summary trace on stale cleanuptrue
CONNECTOR_SESSION_TTLStale session cleanup threshold (seconds)600
CONNECTOR_SESSION_DIROverride temp directory for session filesSystem temp
CONNECTOR_MAX_INPUT_PREVIEWMax characters of prompt preview200
CONNECTOR_MAX_OUTPUT_PREVIEWMax characters of tool-output preview300

HTTP Client

VariableDescriptionDefault
INFINIUM_TIMEOUTRequest timeout in seconds30.0
INFINIUM_MAX_RETRIESMax retry attempts3
INFINIUM_VERIFY_SSLVerify SSL certificatestrue

CI/Docker Example

export INFINIUM_AGENT_ID="your-agent-id"
export INFINIUM_AGENT_SECRET="your-agent-secret"

# Non-interactive setup
infinium-codex init \
  --agent-id "$INFINIUM_AGENT_ID" \
  --agent-secret "$INFINIUM_AGENT_SECRET" \
  --no-interactive

Uninstall

Completely remove the connector:

infinium-codex uninstall

This removes:

  • Infinium hooks from .codex/hooks.json (other hooks in that file are preserved)
  • Credentials (config file + keyring secret)

To skip the confirmation prompt:

infinium-codex uninstall -y

You can reinstall at any time with pip install infinium-codex-connector and infinium-codex init.