This note documents one practical boundary around codex-agent-mem when it runs inside long-lived Codex Desktop sessions.
The strongest current diagnosis is:
codex-agent-mem is not the sole root cause of the observed MCP accumulation and freeze behaviorcodex-agent-mem can still amplify the cost of that problem if the host keeps opening or retaining MCP processesIn other words:
codex-agent-mem needed runtime hardening. v0.9.0 added the first defensive lifecycle layer, and v1.0.0 adds lower-impact runtime modes, lazy initialization, compact responses, pack-hash reuse, heartbeat diagnostics, optional telemetry, and an optional daemon/stdio bridge. The broader Desktop lifecycle issue still sits above any one MCP.
In controlled checks with the same global MCP configuration:
codex exec --ephemeral finished cleanlyIn the long-lived Codex Desktop app-server:
That makes the working diagnosis much more about host lifecycle than about one repository or one MCP command.
codex-agent-memcodex-agent-mem still matters, even if it is not the primary cause.
If the host keeps too many MCP processes alive:
So the right product response is not denial. It is defensive runtime behavior.
v0.9.0 and v1.0.0 hardenv0.9.0 adds several runtime-facing defenses:
--sync-project-doc is opt-in instead of default--idle-timeout-secondsmem_health_runtimeWALbusy_timeoutsynchronous=NORMALtemp_store=MEMORYThese changes do not claim to fix Codex Desktop itself. They reduce unnecessary work, shorten orphan lifetime, and leave better evidence behind.
v1.0.0 adds a lower-impact operating mode:
--profile minimal|standard|full--read-onlycontent.text responses with full data preserved in structuredContentknown_pack_hash / not_modified for unchanged continuity packssame_db_process_count and spawn_storm_warningcodex-agent-mem-daemon plus stdio bridge modeUntil the long-lived Desktop lifecycle is cleaner, the safest operating guidance is:
codex exec --ephemeral for controlled or long-running flows.codex-agent-mem on v1.0.0 or newer when using Codex Desktop heavily.--sync-project-doc only when you actually want automatic AGENTS.md reinjection.mem_health_runtime when diagnosing process buildup.--idle-timeout-seconds 1800; keep shorter values such as 300 for CLI/ephemeral runs.This is an observed runtime diagnosis, not a blanket claim about every Codex Desktop build or every host environment.
It exists because the distinction matters:
That second responsibility is part of codex-agent-mem itself, and v1.0 continues in that direction with stronger observability and lower-impact runtime modes.