2.0 KiB
Codex ai-memory connection repair — 7 November 2026
The ai-memory server was healthy at localhost:49375, but the Codex MCP entry used HTTP bearer_token_env_var = "AI_MEMORY_AUTH_TOKEN" while that environment variable was absent in the active client. Skills and lifecycle capture were installed; missing MCP tools were a connection/authentication configuration issue, not lost project memory.
Changed only [mcp_servers.ai-memory] in ~/.codex/config.toml to the existing native bridge:
[mcp_servers.ai-memory]
command = "/Users/alan/.local/bin/ai-memory"
args = ["mcp-bridge", "--no-session-id", "--server-url", "http://127.0.0.1:49375/mcp"]
default_tools_approval_mode = "approve"
The bridge loads existing ai-memory credentials itself. No token was printed, copied into Codex configuration, or committed. All unrelated Codex settings/server entries and the existing approval mode were preserved. Backup: ~/.codex/config.toml.before-memory-bridge-1794011224091594000.
Verification:
- ai-memory3.1.1 status healthy; doctor resolved this checkout to
default/alan-pipelinesand found Codex hooks trusted/capture present. - A bridge subprocess with AI_MEMORY_AUTH_TOKEN deliberately absent initialized, listed24 tools, and executed an explicitly scoped memory_query successfully.
- A separate temporary Codex app-server initialized against the repaired configuration and discovered ai-memory with24 tools. Diagnostic processes exited.
- CLI search and read-page retrieved this conversation's stored session history.
No shared daemon, Pipelines backend, chat or ai-memory server was restarted. The current model-visible tool catalog did not hot-reload; CLI/bridge access works immediately, while native tool exposure applies when the client reloads its MCP configuration/new session. This bridge forwards no lifecycle session identity, so project-scoped MCP requests must explicitly pass workspace: default, project: alan-pipelines, per the retrieval skill's static-client rule. No wiki content, capture policy, retention or skills were changed.