From f4ba2ab25ef99aed40ceb995a3ef8a4d410b9c67 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Sat, 7 Nov 2026 00:29:24 +0000 Subject: [PATCH] Document verified Codex ai-memory connection repair --- docs/notes/ai-memory-codex-connection.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/notes/ai-memory-codex-connection.md diff --git a/docs/notes/ai-memory-codex-connection.md b/docs/notes/ai-memory-codex-connection.md new file mode 100644 index 00000000..8dbdfb92 --- /dev/null +++ b/docs/notes/ai-memory-codex-connection.md @@ -0,0 +1,23 @@ +# 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: + +```toml +[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-pipelines` and 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.