Skip to content

rohitg00/agentmemory

v0.9.9 Bugfix

This release fixes issues for SREs watching stability and regressions.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

agentmemory agents ai claude claudecode codex
+7 more
copilot cursor genai harness hermes memory openclaw

Summary

AI summary

Updates https://github.com/wyh0626, https://github.com/rager306, and or npx @agentmemory/agentmemory across a mixed release.

Full changelog

Two field-reported regressions closed: pinned memory slots never reached SessionStart context (the renderPinnedContext and listPinnedSlots helpers shipped in v0.7 had no callers), and the MiniMax compression provider read its base URL straight off process.env, missing ~/.agentmemory/.env values that the rest of agentmemory loads through the shared merged-env path.

Fixed

Pinned memory slots are now actually injected into SessionStart context

@wyh0626 traced (#286) that renderPinnedContext (src/functions/slots.ts:182) and listPinnedSlots (src/functions/slots.ts:169) — introduced in #182 — had zero callers in src/:

$ git grep renderPinnedContext src/
src/functions/slots.ts:182:export function renderPinnedContext(...)

$ git grep listPinnedSlots src/
src/functions/slots.ts:169:export async function listPinnedSlots(...)

mem::context (the function /agentmemory/session/start invokes and that session-start.mjs reads back into Claude Code) read profile / sessions / summaries / observations but never slots, so anything an agent wrote into a pinned slot via mem::slot-replace / mem::slot-append / mem::slot-reflect sat in KV and never reached the next session.

The mem::slot-reflect writer fires on the Stop hook when AGENTMEMORY_REFLECT=true and persists into pending_items / session_patterns / project_context — the reflect → next-session loop was open.

The fix wires listPinnedSlotsrenderPinnedContext into mem::context behind isSlotsEnabled(), matching the existing isGraphExtractionEnabled() gate convention:

if (isSlotsEnabled()) {
  const slotContent = renderPinnedContext(
    await listPinnedSlots(kv).catch(() => []),
  );
  if (slotContent) {
    blocks.push({
      type: "memory",
      content: slotContent,
      tokens: estimateTokens(slotContent),
      recency: Date.now(),
    });
  }
}

recency: Date.now() so the pinned block sorts to the top of the budget-bounded selection.

Verify:

# server: AGENTMEMORY_SLOTS=true AGENTMEMORY_INJECT_CONTEXT=true
curl -X POST localhost:3111/agentmemory/slot/replace \
  -H 'Content-Type: application/json' \
  -d '{"label":"tool_guidelines","content":"rule-alpha"}'

curl -X POST localhost:3111/agentmemory/session/start \
  -H 'Content-Type: application/json' \
  -d '{"sessionId":"s1","project":"/tmp","cwd":"/tmp"}'

Before: "context": "" (0 chars).
After: context contains the tool_guidelines slot wrapped in <agentmemory-context>.

AGENTMEMORY_SLOTS=false (the default) keeps the existing behaviour untouched.

(#288, closes #286 — thanks @wyh0626 for the precise zero-callers trace and the six-case regression suite covering global / multi-sort / unpinned-skip / empty-skip / project-shadows-global / gate-off)

MiniMax provider now honors MINIMAX_BASE_URL from ~/.agentmemory/.env, with the default pointed at the current Anthropic-compatible host

@rager306 reported (#285) v0.9.8 MiniMax compression failing MiniMax API error 401: invalid api key against a verified-good key:

  • Direct curl https://api.minimax.io/anthropic/v1/messages with the same key → 200 OK.
  • Control curl https://api.minimaxi.com/anthropic/v1/messages with the same key → 401.

The 401 was the stale fallback host answering — the key was fine.

Root cause: split-brain env source. src/config.ts (provider detection + API-key load) reads ~/.agentmemory/.env through the merged getMergedEnv() loader; src/providers/minimax.ts read MINIMAX_BASE_URL straight off process.env:

// before
this.baseUrl =
  process.env['MINIMAX_BASE_URL'] || 'https://api.minimaxi.com/anthropic'

Deployments that kept MiniMax config in ~/.agentmemory/.env only (systemd / launchd / --env-file not exported into the worker shell) got the key loaded but the base URL fell through to the stale default.

The provider now resolves MINIMAX_BASE_URL via getEnvVar() (same merged loader the rest of agentmemory uses), and the default is bumped from api.minimaxi.com to api.minimax.io/anthropic per MiniMax's current Anthropic-compatible docs:

// after
this.baseUrl =
  getEnvVar('MINIMAX_BASE_URL') || 'https://api.minimax.io/anthropic'

Existing users on the legacy host can still override via MINIMAX_BASE_URL either in ~/.agentmemory/.env or the process env.

(#289, closes #285 — thanks @rager306 for the precise repro and the local-patch verification)

Changed

  • @agentmemory/mcp package version bumped 0.9.8 → 0.9.9 to lockstep with the main package.

Install / upgrade

npm i -g @agentmemory/[email protected]
# or
npx @agentmemory/agentmemory

# MCP standalone shim
npx -y @agentmemory/mcp

Full changelog: v0.9.8...v0.9.9

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track rohitg00/agentmemory

Get notified when new releases ship.

Sign up free

About rohitg00/agentmemory

All releases →

Beta — feedback welcome: [email protected]