agentmemory icon indicating copy to clipboard operation
agentmemory copied to clipboard

v.0.9.24 sdk.triggerVoid is not a function

Open alxjzx100 opened this issue 6 months ago • 2 comments

After update to latest version keep observing this warning in the logs:

[agentmemory] warn event::session::stopped triggerVoid failed {"sessionId":"***","error":"sdk.triggerVoid is not a function"}

Claude Code

AGENTMEMORY_AUTO_COMPRESS=true       
AGENTMEMORY_INJECT_CONTEXT=true
CONSOLIDATION_ENABLED=true             
GRAPH_EXTRACTION_ENABLED=true  

alxjzx100 avatar May 29 '26 19:05 alxjzx100

+1

tmaarcxs avatar May 30 '26 08:05 tmaarcxs

The agentmemory codebase makes extensive use of a method sdk.triggerVoid("function-id", payload):

sdk.triggerVoid("event::session::stopped", { sessionId });
sdk.triggerVoid("mem::slot-reflect", { sessionId: data.sessionId });
sdk.triggerVoid("mem::graph-extract", { observations: compressed });

However, iii-sdk (the underlying engine SDK) has never exposed a triggerVoid method.

Inspecting iii-sdk from 0.11.2 (the version locked in package.json) all the way up to the latest 0.16.1 confirms that the public API only provides:

sdk.trigger(request: {
  function_id: string;
  payload?: unknown;
  action?: { type: "void" | ... };
  timeoutMs?: number;
}): Promise<unknown>

Inside iii-sdk, the trigger implementation handles fire-and-forget via the action field:

// iii-sdk source (0.11.2 – 0.16.1)
this.trigger = async (request) => {
  const { function_id, payload, action, timeoutMs } = request;
  if (action?.type === "void") {
    // sends message without awaiting response
    this.sendMessage(MessageType.InvokeFunction, { function_id, data: payload, action });
    return;
  }
  // ... normal awaitable invocation
};

Because sdk.triggerVoid is undefined, every invocation throws:

TypeError: sdk.triggerVoid is not a function

The error is caught by local try/catch blocks, so the process does not crash, but the intended background task is never executed.

LeonemFu avatar May 30 '26 10:05 LeonemFu