Skip to content

fix(agentmemory): raise memory limit to 8Gi as staircase measurement - #1489

Merged
Aviator-Coding merged 1 commit into
mainfrom
fm/homeops-agentmemory-limit-8gi
Aug 29, 2026
Merged

fix(agentmemory): raise memory limit to 8Gi as staircase measurement#1489
Aviator-Coding merged 1 commit into
mainfrom
fm/homeops-agentmemory-limit-8gi

Conversation

@Aviator-Coding

Copy link
Copy Markdown
Owner

Intent

Raise the ai/agentmemory memory limit to 8Gi as a measurement of whether the mem::consolidate-pipeline staircase converges, and separately establish (report only, do not upgrade) whether a newer upstream release already fixes the underlying per-tick arena retention.

Why 8Gi and not 5Gi: a completed investigation measured that mem::consolidate-pipeline permanently retains roughly 1130 MiB every 120-minute tick and never gives it back. A single consolidation tick from the cleanest baseline took the cgroup 2123 -> 3871 MiB in about 4 seconds, leaving only 225 MiB of the current 4096 MiB unused. Later ticks start from a plateau roughly 1100 MiB higher. talos-2 never dropped below 57 GiB available. The captain chose 8Gi deliberately. A limit that lands just under the real peak is actively worse than the current state: it converts a clean 14-second restart into a 90-second liveness reclaim stall. Do not shave this number down. Keep the request-to-limit relationship sane and consistent with this repo (the previous pair was request 2Gi / limit 4Gi, 1:2; this change uses request 4Gi / limit 8Gi to keep that ratio).

This is a measurement, not a declared fix. Update the existing explanatory comment block in kubernetes/apps/base/ai/agentmemory/app/helmrelease.yaml so it tells the truth: the prior comment said "Not a leak" and described a 120-minute timer coincidence with a ~3588 MiB floor - that model is incomplete. Record per-tick retention of roughly 1130 MiB, of which about 960 MiB sits in glibc per-thread malloc arenas, so the floor rises every tick rather than once. Record that both earlier remedies worked and neither could fix this - de-harmonisation lowered the starting floor by ~560 MiB and raised mean container lifetime from 1h58m to 5h04m, measured across 27 container incarnations. Point at the 2026-08-29 recurrence investigation for the full evidence.

Explicitly do NOT: set MALLOC_ARENA_MAX (running the limit raise and the arena cap together makes neither result interpretable; the arena cap remains the next step if the high-water mark proves effectively unbounded); change consolidation or auto-forget intervals (AUTO_FORGET_INTERVAL_MS=86400000 stays); change the image or the chart version.

Second deliverable, reported in the PR description, not applied: verify we run agentmemory 0.9.29 (ghcr.io/joryirving/agentmemory) and iii 0.11.2 against the live workload; whether any newer release of either exists and whether its changelog, commits, or issues mention memory retention, arena growth, consolidation memory, or an equivalent fix; whether Renovate would ever propose that release or skip it the way prereleases are. Do not upgrade anything. If nothing newer addresses it, say that plainly.

Do not apply this change to the cluster by hand - it reaches the cluster through Flux when the PR merges. State in the PR description how to read the result afterwards: watch container_memory_usage_bytes, not working_set, because the gap here is about 570 MiB and that gap is exactly the reserve the kernel spends before it kills.

What Changed

  • Raised ai/agentmemory container memory from request 2Gi / limit 4Gi to request 4Gi / limit 8Gi (same 1:2 ratio) in kubernetes/apps/base/ai/agentmemory/app/helmrelease.yaml as headroom to measure whether the mem::consolidate-pipeline per-tick staircase converges.
  • Rewrote the resources comment: prior "Not a leak" / coincident-timer / ~3588 MiB floor model is incomplete; each 120-minute consolidate tick permanently retains ~1130 MiB (~960 MiB in glibc per-thread malloc arenas), so the floor rises every tick. Notes that de-harmonisation and the earlier 4Gi raise both helped lifetime but could not stop the staircase; leaves MALLOC_ARENA_MAX unset and does not change image, chart, or AUTO_FORGET_INTERVAL_MS.
  • No cluster apply in this change — Flux reconciles it after merge.

Upstream check (report only; nothing upgraded)

  • Pinned / running: ghcr.io/joryirving/agentmemory tag 0.9.29 (digest sha256:74f1175c…); comments and wiring still describe iii 0.11.2 (agentmemory package.json pins iii-sdk@0.11.2; changelog audit text matches).
  • agentmemory: upstream rohitg00/agentmemory latest tag/release and npm @agentmemory/agentmemory latest are still 0.9.29 (2026-08-16). No newer release exists to upgrade to. Changelog "memory leak" entries (e.g. 0.9.28 #1057, 0.9.27 #817) are cross-agent isolation / context filtering, not RSS, glibc arena growth, or consolidate-tick retention. Nothing in 0.9.27–0.9.29 addresses per-tick arena retention.
  • iii / iii-sdk: npm iii-sdk latest is 0.22.1 (also rc / next lines past that). agentmemory has not moved off the 0.11.2 pin, so a newer iii is not part of any published agentmemory release that fixes this. No public iii changelog/issue evidence was found that an arena/consolidate retention fix already shipped in a release agentmemory consumes.
  • Renovate: no special skip/override for this image. When a newer stable ghcr.io/joryirving/agentmemory tag appears, Renovate can open a version PR; digest-only updates auto-merge. Unstable/prerelease tags are not treated like normal stable bumps (same class as other prerelease skips). Today there is simply no newer agentmemory tag for it to propose.

How to read the result after merge

Watch container_memory_usage_bytes, not working_set: the gap is ~570 MiB and is the reserve the kernel spends before it kills. Goal is whether the consolidate-tick staircase plateaus under 8Gi or keeps climbing toward the new limit.

Risk Assessment

✅ Low: Single bounded measurement change: request/limit 4Gi/8Gi with an accurate comment rewrite, no forbidden knobs, image, or interval changes.

Testing

Parsed and kustomize-built the agentmemory HelmRelease to confirm the 4Gi request / 8Gi limit measurement (1:2 preserved), unchanged 0.9.29 image, unchanged AUTO_FORGET_INTERVAL_MS, and no MALLOC_ARENA_MAX, with the operator comment rewritten to the staircase model; independently re-verified npm/GitHub/GHCR/Renovate that nothing newer fixes per-tick arena retention. No kubeconfig here so live pod image was not re-probed (commit already records that check).

Evidence: Before/after resources and invariants transcript
agentmemory memory limit staircase measurement — local test evidence
=====================================================================

BEFORE (base 83344f78):
  resources.requests.memory = 2Gi
  resources.limits.memory   = 4Gi
  image = ghcr.io/joryirving/agentmemory:0.9.29@sha256:74f1175c...
  AUTO_FORGET_INTERVAL_MS = 86400000
  MALLOC_ARENA_MAX = unset

AFTER (HEAD d78a2739):
  resources.requests.memory = 4Gi
  resources.limits.memory   = 8Gi
  image = ghcr.io/joryirving/agentmemory:0.9.29@sha256:74f1175c... (UNCHANGED)
  AUTO_FORGET_INTERVAL_MS = 86400000 (UNCHANGED)
  MALLOC_ARENA_MAX = unset (UNCHANGED)
  ratio = 1:2 preserved (2Gi/4Gi -> 4Gi/8Gi)

kustomize build kubernetes/apps/base/ai/agentmemory/app
  -> HelmRelease/agentmemory in namespace ai with the AFTER resources
  -> semantic acceptance: PASS (see semantic-acceptance.json)

Operator comment block on resources:
  - reframes as measurement, not fix
  - records ~1130 MiB/tick retention (~960 MiB glibc arenas)
  - records de-harmonisation lifetime 1h58m -> 5h04m across 27 incarnations
  - points at 2026-08-29 investigation
  - instructs watch container_memory_usage_bytes not working_set

Upstream (report-only, re-verified in test phase):
  @agentmemory/agentmemory latest npm+GitHub release = 0.9.29
  main is 1 commit ahead (#892 portable CLI) — not a memory fix
  pins iii-sdk 0.11.2; iii-sdk latest stable 0.22.1; head prerelease 0.23.0-rc.8
  No release/changelog line describes a per-tick arena retention fix
  Open issue #1153 is a different 61s OOM pattern
  Renovate tracks the joryirving docker image; patch 0.9.30 would automerge;
    minor 0.10.0 waits 3d; prereleases skipped by default ignoreUnstable
  Conclusion: nothing newer addresses this; do not upgrade

Live cluster: kubeconfig not available in worktree (Flux-only apply path as required)
Evidence: Semantic acceptance checks (PASS)
{
  "checks": {
    "kustomize_emits_helmrelease": true,
    "namespace_ai": true,
    "image_repo": true,
    "image_tag_0.9.29": true,
    "image_unchanged_from_baseline": true,
    "request_memory_4Gi": true,
    "limit_memory_8Gi": true,
    "ratio_1_to_2": true,
    "baseline_was_2Gi_4Gi": true,
    "AUTO_FORGET_unchanged_86400000": true,
    "no_MALLOC_ARENA_MAX": true,
    "no_cpu_limit": true,
    "chartRef_unchanged": true,
    "chartRef_name_app-template": true,
    "chartRef_kind_OCI": true,
    "operator_comment_complete": true,
    "env_keys_unchanged": true,
    "env_values_unchanged": true
  },
  "doc_hits": {
    "Measurement, not a declared fix": true,
    "~1130 MiB": true,
    "glibc": true,
    "per-thread malloc arenas": true,
    "floor rises every tick": true,
    "1h58m": true,
    "5h04m": true,
    "27": true,
    "MALLOC_ARENA_MAX": true,
    "container_memory_usage_bytes": true,
    "working_set": true,
    "2026-08-29": true,
    "8Gi": true,
    "4Gi": true,
    "1:2": true,
    "Not a leak": true,
    "3588": true,
    "incomplete": true
  },
  "rendered": {
    "requests": {
      "cpu": "100m",
      "memory": "4Gi"
    },
    "limits": {
      "memory": "8Gi"
    },
    "image": {
      "repository": "ghcr.io/joryirving/agentmemory",
      "tag": "0.9.29@sha256:74f1175c9ed75e1a00cdedab60560926d941f4dd6624efa0ebf7a7b27f071e72"
    },
    "AUTO_FORGET_INTERVAL_MS": "86400000"
  },
  "baseline": {
    "requests": {
      "cpu": "100m",
      "memory": "2Gi"
    },
    "limits": {
      "memory": "4Gi"
    },
    "image_tag": "0.9.29@sha256:74f1175c9ed75e1a00cdedab60560926d941f4dd6624efa0ebf7a7b27f071e72"
  },
  "kinds_emitted": [
    [
      "ExternalSecret",
      "agentmemory"
    ],
    [
      "HelmRelease",
      "agentmemory"
    ]
  ],
  "env_value_diffs": {},
  "PASS": true
}
Evidence: kustomize-built agentmemory manifests showing 4Gi/8Gi
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: agentmemory
  namespace: ai
spec:
  dataFrom:
  - extract:
      key: agentmemory
  refreshInterval: 1h
  secretStoreRef:
    kind: ClusterSecretStore
    name: onepassword
  target:
    name: agentmemory
    template:
      data:
        AGENTMEMORY_SECRET: '{{ .AGENTMEMORY_SECRET }}'
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: agentmemory
  namespace: ai
spec:
  chartRef:
    kind: OCIRepository
    name: app-template
  install:
    remediation:
      retries: -1
  interval: 1h
  upgrade:
    cleanupOnFail: true
    remediation:
      retries: 3
  values:
    controllers:
      agentmemory:
        annotations:
          reloader.stakater.com/auto: "true"
        containers:
          app:
            command:
            - /usr/bin/catatonit
            - --
            - /bin/sh
            - -c
            - |
              PREFS_HOME="${HOME:-/home/node}"
              mkdir -p "$PREFS_HOME/.agentmemory"
              if [ ! -s "$PREFS_HOME/.agentmemory/preferences.json" ]; then
                printf '%s\n' '{"schemaVersion":1,"lastAgent":null,"lastAgents":[],"lastProvider":null,"skipSplash":true,"skipNpxHint":true,"skipGlobalInstall":true,"skipConsoleInstall":true,"firstRunAt":"1970-01-01T00:00:00.000Z"}' > "$PREFS_HOME/.agentmemory/preferences.json"
              fi
              exec /entrypoint.sh
            env:
              AGENTMEMORY_AUTO_COMPRESS: "true"
              AGENTMEMORY_DROP_STALE_INDEX: "true"
              AGENTMEMORY_LLM_TIMEOUT_MS: "120000"
              AGENTMEMORY_REFLECT: "true"
              AGENTMEMORY_TOOLS: all
              AGENTMEMORY_VIEWER_HOST: 0.0.0.0
              AUTO_FORGET_INTERVAL_MS: "86400000"
              CONSOLIDATION_DECAY_DAYS: "60"
              CONSOLIDATION_ENABLED: "true"
              EMBEDDING_PROVIDER: openai
              GRAPH_EXTRACTION_ENABLED: "true"
              III_REST_PORT: "3111"
              OPENAI_API_KEY: local
              OPENAI_API_KEY_FOR_LLM: "true"
              OPENAI_BASE_URL: http://internal-noauth.ai.svc.cluster.local/v1
              OPENAI_EMBEDDING_DIMENSIONS: "1536"
              OPENAI_EMBEDDING_MODEL: openai/text-embedding-3-small
              OPENAI_MODEL: deepseek/deepseek-v4-flash
              RUST_LOG: warn
              SNAPSHOT_ENABLED: "false"
              SUMMARIZE_CHUNK_CONCURRENCY: "2"
              TZ: ${CONFIG_TIMEZONE}
              VIEWER_ALLOWED_HOSTS: agentmemory.${SECRET_DOMAIN}
              VIEWER_ALLOWED_ORIGINS: https://agentmemory.${SECRET_DOMAIN}
            envFrom:
            - secretRef:
                name: agentmemory
            image:
              repository: ghcr.io/joryirving/agentmemory
              tag: 0.9.29@sha256:74f1175c9ed75e1a00cdedab60560926d941f4dd6624efa0ebf7a7b27f071e72
            probes:
              liveness:
                custom: true
                enabled: true
                spec:
                  failureThreshold: 3
                  httpGet:
                    path: /agentmemory/livez
                    port: 3111
                  initialDelaySeconds: 0
                  periodSeconds: 30
                  timeoutSeconds: 5
              readiness:
                custom: true
                enabled: true
                spec:
                  failureThreshold: 3
                  httpGet:
                    path: /agentmemory/livez
                    port: 3111
                  initialDelaySeconds: 0
                  periodSeconds: 30
                  timeoutSeconds: 5
              startup:
                custom: true
                enabled: true
                spec:
                  failureThreshold: 60
                  httpGet:
                    path: /agentmemory/livez
                    port: 3111
                  periodSeconds: 5
            resources:
              limits:
                memory: 8Gi
              requests:
                cpu: 100m
                memory: 4Gi
            securityContext:
              allowPrivilegeEscalation: false
              capabilities:
                drop:
                - ALL
        replicas: 1
        strategy: Recreate
    defaultPodOptions:
      securityContext:
        fsGroup: 1000
        fsGroupChangePolicy: OnRootMismatch
        runAsGroup: 1000
        runAsNonRoot: true
        runAsUser: 1000
        seccompProfile:
          type: RuntimeDefault
    persistence:
      data:
        existingClaim: agentmemory
        globalMounts:
        - path: /data
        - path: /home/node
      tmp:
        globalMounts:
        - path: /tmp
        type: emptyDir
    route:
      app:
        hostnames:
        - '{{ .Release.Name }}.${SECRET_DOMAIN}'
        parentRefs:
        - name: envoy-internal
          namespace: network
          sectionName: https
        rules:
        - backendRefs:
          - name: agentmemory
            port: 3111
          matches:
          - path:
              type: PathPrefix
              value: /agentmemory
        - backendRefs:
          - name: agentmemory
            port: 3112
          matches:
          - path:
              type: PathPrefix
              value: /stream
        - backendRefs:
          - name: agentmemory
            port: 3112
          matches:
          - headers:
            - name: Upgrade
              value: websocket
            path:
              type: PathPrefix
              value: /
        - backendRefs:
          - name: agentmemory
            port: 3113
    service:
      app:
        ports:
          api:
            port: 3111
          streams:
            port: 3112
          viewer:
            port: 3113
Evidence: Upstream report-only re-verification (npm/GitHub/GHCR/Renovate)
{
  "verified_at": "test-phase independent re-check",
  "agentmemory": {
    "npm_package": "@agentmemory/agentmemory",
    "npm_latest": "0.9.29",
    "npm_newer_than_0.9.29": [],
    "github": "rohitg00/agentmemory",
    "latest_release_tag": "v0.9.29",
    "main_ahead_of_v0.9.29": {
      "ahead_by": 1,
      "commits": [
        {
          "sha": "e04ba88",
          "msg": "fix(cli): make fresh installs portable and persistent (#892)"
        }
      ],
      "is_memory_fix": false
    },
    "pins_iii_sdk": "0.11.2",
    "ghcr_joryirving_tags_include": [
      "0.9.27",
      "0.9.28",
      "0.9.29"
    ],
    "ghcr_0.9.29_digest_suffix": "sha256:74f1175c9ed75e1a00cdedab60560926d941f4dd6624efa0ebf7a7b27f071e72",
    "digest_matches_helmrelease": true,
    "release_notes_mention_per_tick_arena_retention_fix": false,
    "related_open_issue": {
      "number": 1153,
      "title": "iii-engine OOM-killed every ~61s: allocation spike scales with the container limit (0.11.2 and 0.11.5)",
      "note": "Related but different OOM pattern (61s unbounded spike), not the 120-min consolidate-pipeline staircase.",
      "url": "https://github.com/rohitg00/agentmemory/issues/1153"
    }
  },
  "iii": {
    "npm_package_used_by_agentmemory": "iii-sdk",
    "pinned_by_agentmemory_0.9.29": "0.11.2",
    "iii_sdk_latest_stable": "0.22.1",
    "iii_sdk_prerelease_head": "0.23.0-rc.8",
    "architecture_note_from_issue_1153": ">=0.11.6 changes engine architecture; agentmemory held at 0.11.2",
    "changelog_fix_for_per_tick_arena_retention": "none found on agentmemory side; iii-sdk has no public github repository metadata on npm"
  },
  "renovate": {
    "tracks": "ghcr.io/joryirving/agentmemory docker tag (not iii directly)",
    "ignoreUnstable_default": "Renovate default ignoreUnstable=true skips 0.23.0-rc.* style prereleases",
    "autoMerge_patch": "docker patch automerge true (branch) via .renovate/autoMerge.json5",
    "autoMerge_minor": "docker minor automerge true after minimumReleaseAge 3 days",
    "would_propose_0.9.30": "yes, patch automerge",
    "would_propose_0.10.0": "yes as minor after 3 days, then automerge",
    "would_propose_0.23.0-rc.8_on_iii": "N/A - iii not directly renovated; would skip as unstable if it were"
  },
  "conclusion": "Nothing newer than agentmemory 0.9.29 / iii 0.11.2 addresses per-tick arena retention. Do not upgrade.",
  "live_workload": "No kubeconfig in this worktree; git-declared image remains 0.9.29 with digest matching GHCR tag; commit message records live verify 2026-08-29.",
  "post_merge_watch": "container_memory_usage_bytes (not working_set); ~570 MiB gap is kernel reserve before kill."
}
Evidence: GHCR joryirving/agentmemory tag list
{"name":"joryirving/agentmemory","tags":["sandbox","sha256-4a8f62c6c59e57f6f9667bed73decf1c5d8757b3047abd266de63c1eae15a5d7","sha256-390a7f0ccd278c897af45ced9ef1e8eb99e6a55c2bb9836853715fa49b3fde0e","sha256-e2bde4e7e8d35c1408bdc0bcbe3204698fed332efa46f4f001375dea6095a7b6","sha256-1bfdf22e62b41ea76fe1b51d39cf937f740629f8c0ae0b34d31b99fdc8e47e18","0.9.21","0.9","0","rolling","sha256-2c92f9188ea333ddb79e5e66a237c3868aee236a412c179e43869c1eaaa29393","sha256-6ed3ccaec73d70286b9e8285681a4075c810780419cff4c08f9af2da2280af3a","sha256-44ca17a023eaedb87adfa6db7d85d542d20b3aee21e1174489c81445bebffaf9","sha256-e9427e2285af1a00fe52ea9fd419add424835f5db0051dde68f809220e1be6ae","sha256-fa0a5c1aab506ce767d3e2d0c7c840c0dde792e70a57e6085f0d349fe86e6cf5","sha256-ffacd1c8b3e592117a78629552f792ef651df4f4cf2f60dd17a44d22710bacfb","sha256-a29a538b418dadabfd7778eaa1595e88cd33431a925d9fe6f7c51c23032250ef","sha256-6429bc403613a3a4a418d5c0f953e2d5cbfaa94174441d519a7a308e2bff5b18","sha256-85d85b2277c139d6384077e03884ee01ab77565b989102448e2290d02707bf22","sha256-ad34c6f0a62c83848492f03723ec25473818fe430392d9660c9fc2afdcdb3f76","sha256-7a1c1032a6fa3ffac56525c50f2b5f6bc15c155367d83d0cfcc3879d9ebc5142","sha256-605565cc2eb52b4c9ac984b2857b833f58cb34a129e3aa9c4eccb0c7806a4ef3","sha256-c142d902bd27c2667234d1f553920c76a8253af7128a6c58a0f2847dd771f750","sha256-431272d16a8c1d401651f198b439fd707b3e624e0036829dc0e3ffa4eef0ce63","sha256-f10ec70513a3ab7ac88d74fbc4d8ca855b43e765ee8743924300a8e360ccf711","sha256-5cab25e4645f237d74d6d912e59e8f0243770385314f202f6ba6356fec43d3bc","sha256-64e7010c921a142a04eb0b9007f6e0e537b864af1994e3f799904ba53ecaaa25","sha256-0018bcdda585d602c7c0debbd0aea82f05ab1beaab5de00db5044e88c387f438","sha256-32351191116999cac6fe9d0251e85515eeff8ed2bb0fb05bbc42befc04b7ae1f","sha256-6e586b53a41ef68d34cd593e6d3fd6c1b988cfce4304643628c985f99b6debc2","sha256-92c19b339aca881db18d1f4d8d4b030bee43dd2ede4dfa8db2b219dd6cee13ea","sha256-18f48ef6771551c19d339b4183c1bf31aa25bf77b45dc7e661f9fd3add4881aa","sha256-0830c4e49b284f9402c9096637a077ecf241e3ad394b63b122c0af15c8645d6f","sha256-48b1893e9d02446a6432b8203cff72e23c5bdc89047c674a6192a3148004ffc2","sha256-79761efe4e0c44c242d8bd811eeee9d495b80155b812314306ab451938b3c5c9","sha256-2b8848118cf142d201d8aef9536ab33b4cf88078d2ed90866c390b3b307513a5","sha256-530bc4b35178a250213049ec4e80815cd18fcb6e3783546a8b21d4db19a8f7b3","sha256-71830cc1d38c9511a78cd4316f365683033c96352e1bc1e8ffd2444077b74c7c","sha256-4cfef2a39194bbe2effaa43b7a7ac281ac55ab881ba1135cc4e85a00379fb72f","sha256-e5629f3ee379fa2003182bca635bee3242a68cf35f96d409645bf8837b529e1e","sha256-2470959521dd883e87a1873041a8d8b0d6ebce1391760ff837c1cd43e65cfd89","sha256-5bbb4026c712da10f432afdc47c54a54733bc22fee4ac6de9090ce6b85e01b40","sha256-8eb92813a4924f3fc650bc929e29f9c41502e3533ab81cca7a26041a14dbd988","sha256-8882c5cb96120d324e7ee13d4d35268c737c19ab041eab55ea3f3daf4aae9484","0.9.27","sha256-8f39fc9c49dc1fa9566e6a23247538be8d19b48dc8e463fb93ec58715bec1be4","sha256-5df7e45cf1035ef1823df104d7637a6b075ccc0489082e00ba1db1c5d7abe3cc","sha256-3dbd28e1194f9e36babef9f8611ee10b5673444aed8df8b74144c3ba91073e48","sha256-fb7c400bada2b0f97035551f0a21193750997f057e44ae6d843a1fc6802f0f65","0.9.28","sha256-a1fc1fedb18ca7f4a6be782ed742d24ee86358ebe9bbc303c3e3f7fba5389b83","sha256-51cc7df77f5e7c3cf294545a9d2cc36a8b693b258949d8feb05af559889e9783","0.9.29","sha256-74f1175c9ed75e1a00cdedab60560926d941f4dd6624efa0ebf7a7b27f071e72"]}
Evidence: agentmemory v0.9.29 GitHub release body
{"body":"No breaking changes, drop-in upgrade.\n\n## Added\n- Cursor plugin: 7 auto-capture hooks + 17 skills + MCP, IDE and `cursor-agent` CLI\n- Devin support: `connect devin --with-hooks` (6 native hooks) and a Devin plugin manifest for `/agentmemory:\u003cskill\u003e` commands\n- DeepSeek Harness connector (`connect dsh`), with `--with-hooks` for full auto-capture\n- `connect pi` now actually installs the extension; capture reaches parity with the Claude Code plugin\n- Two new skills, 15 → 17: `memory-discipline` (when to recall and save) and `/lesson` (corrections become confidence-weighted rules)\n- Write-time provenance on every record: origin channel stamped at capture, save, and import\n- Keyless graph extraction: the knowledge graph now populates without an LLM key\n- `AGENTMEMORY_LLM_NOTHINK=1` to skip the hidden thinking pass during graph extraction\n- Viewer clarity pass: two-pane session explorer, expandable records, honest zero states\n\n## Fixed\n- MCP `initialize` now negotiates the client's protocol version instead of hardcoding `2024-11-05` (#908)\n- Hybrid BM25 + vector + graph ranking reaches `memory_recall`, not just smart-search\n- Superseded memory versions leave the search indexes; recall stops returning stale facts as current\n- Lesson recall runs off a real index instead of scanning the whole corpus per query\n- `agentId` threads through every save path (#1159, #1160, #1197)\n- Prompt dedup no longer swallows prompts after the first in a TTL window (#1173)\n- Stop hook no longer summarizes twice (#1203)\n- Per-session project attribution in the OpenCode plugin (#1188)\n- Safe `agentmemory stop` in Docker mode (#1151)\n- `~/.agentmemory/.env` now applies to every module at boot\n\n## Changed\n- Provider default models bumped to current generations (OpenAI, Anthropic, Gemini, MiniMax, OpenRouter); explicit `*_MODEL` overrides unaffected\n\n**Full changelog**: https://github.com/rohitg00/agentmemory/compare/v0.9.28...v0.9.29\n","tag_name":"v0.9.29"}
Evidence: Rendered resources after change
requests.memory=4Gi limits.memory=8Gi image=ghcr.io/joryirving/agentmemory:0.9.29@sha256:74f1175c... AUTO_FORGET_INTERVAL_MS=86400000 MALLOC_ARENA_MAX=unset

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • git diff 83344f78..d78a2739 -- kubernetes/apps/base/ai/agentmemory/app/helmrelease.yaml (before/after resources + single-file scope)
  • semantic YAML parse of HEAD HelmRelease values (4Gi/8Gi 1:2, image 0.9.29 digest, AUTO_FORGET_INTERVAL_MS=86400000, no MALLOC_ARENA_MAX, operator comment contract)
  • baseline semantic parse of 83344f78:.../helmrelease.yaml (2Gi/4Gi)
  • mise exec -- kustomize build kubernetes/apps/base/ai/agentmemory/app then semantic assert on emitted HelmRelease
  • npm registry: @agentmemory/agentmemory@0.9.29 latest; dep iii-sdk@0.11.2; iii-sdk latest stable 0.22.1, prerelease head 0.23.0-rc.8
  • GitHub rohitg00/agentmemory: tags/releases, v0.9.29...HEAD ahead-by-1 (#892), issue #1153, release notes scan for arena/retention fix
  • GHCR joryirving/agentmemory tags/list digest match for 0.9.29
  • Renovate .renovate/autoMerge.json5 patch/minor docker rules for upgrade-proposal behaviour
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

mem::consolidate-pipeline retains ~1130 MiB every 120-minute tick
(~960 MiB in glibc per-thread malloc arenas) and never gives it back.
The 4Gi limit was sized from an incomplete model; a single tick from
a clean baseline already peaks at 3871 MiB, and later ticks start
~1100 MiB higher. 8Gi (request 4Gi, same 1:2 ratio) is headroom to
measure whether the staircase converges, not a declared fix.

Leave MALLOC_ARENA_MAX, AUTO_FORGET_INTERVAL_MS, the image, and the
chart version unchanged so this result stays interpretable.

Live workload verified 2026-08-29: ghcr.io/joryirving/agentmemory
0.9.29@sha256:74f1175c..., iii 0.11.2, request 2Gi / limit 4Gi,
AUTO_FORGET_INTERVAL_MS=86400000, 14 restarts, last OOMKilled at
2026-08-29T10:18:35Z.

Upstream (report in PR, not applied):
- agentmemory latest tagged/npm release is still 0.9.29. main is one
  commit ahead (portable CLI install paths, #892), not a memory fix.
- iii 0.22.1 is current stable (0.23.0-rc.8 is a prerelease) but
  agentmemory still pins iii 0.11.2; 0.11.6+ is an incompatible
  architecture. No changelog/issue/commit on either project describes
  a fix for per-tick arena retention. Open issue #1153 is a related
  but different OOM (61s unbounded spike).
- Renovate tracks the joryirving docker tag, not iii. ignoreUnstable
  default would skip 0.23.0-rc.* the same way other prereleases are
  skipped. A future 0.9.30 would be proposed (patch automerge); a
  0.10.0 would wait 3 days then automerge as minor.

Watch container_memory_usage_bytes after merge, not working_set
(the ~570 MiB gap is the reserve the kernel spends before it kills).
@mortyops

mortyops Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor
--- kubernetes/apps/base/ai/agentmemory/app Kustomization: ai/agentmemory HelmRelease: ai/agentmemory

+++ kubernetes/apps/base/ai/agentmemory/app Kustomization: ai/agentmemory HelmRelease: ai/agentmemory

@@ -111,16 +111,16 @@

                   httpGet:
                     path: /agentmemory/livez
                     port: 3111
                   periodSeconds: 5
             resources:
               limits:
-                memory: 4Gi
+                memory: 8Gi
               requests:
                 cpu: 100m
-                memory: 2Gi
+                memory: 4Gi
             securityContext:
               allowPrivilegeEscalation: false
               capabilities:
                 drop:
                 - ALL
         replicas: 1

@mortyops

mortyops Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor
--- HelmRelease: ai/agentmemory Deployment: ai/agentmemory

+++ HelmRelease: ai/agentmemory Deployment: ai/agentmemory

@@ -125,16 +125,16 @@

             port: 3111
           initialDelaySeconds: 0
           periodSeconds: 30
           timeoutSeconds: 5
         resources:
           limits:
-            memory: 4Gi
+            memory: 8Gi
           requests:
             cpu: 100m
-            memory: 2Gi
+            memory: 4Gi
         securityContext:
           allowPrivilegeEscalation: false
           capabilities:
             drop:
             - ALL
         startupProbe:

@Aviator-Coding
Aviator-Coding merged commit 8c8662b into main Aug 29, 2026
12 checks passed
@Aviator-Coding
Aviator-Coding deleted the fm/homeops-agentmemory-limit-8gi branch August 29, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant