Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
remember: an argument-less call names the likely cause (a tool call cut off at the output-token limit) and the items fix
garrytan1ae3d9cab904
diff --git a/src/core/verbs.ts b/src/core/verbs.tsindex ac32111b12..5b611c9d96 100644--- a/src/core/verbs.ts+++ b/src/core/verbs.ts@@ -113,7 +113,9 @@ const remember: Operation = {throw verbError('invalid_params','fact must be a non-empty string.',- 'Pass the claim to remember, e.g. fact: "picked Stripe over Adyen — onboarding speed".',+ p.fact === undefined && Object.keys(p).length === 0+ ? 'The call arrived with no arguments; a tool call cut off at your output-token limit looks like this. Pass fact, or items with fewer entries per call.'+ : 'Pass the claim to remember, e.g. fact: "picked Stripe over Adyen — onboarding speed", or several as items: [{fact, provenance}].',);}// v1 contract: an absent provenance is a missing required parameter (invalid_params), an empty one is provenance_required.diff --git a/test/memory-verbs-conformance.test.ts b/test/memory-verbs-conformance.test.tsindex 931862c2dc..b2f9fbdf50 100644--- a/test/memory-verbs-conformance.test.ts+++ b/test/memory-verbs-conformance.test.ts@@ -228,6 +228,14 @@ describe('remember — contract behavior', () => {expect(body.protocol_version).toBe(1);});+ it('an argument-less remember (a tool call cut off at the output limit) stays invalid_params and says so', async () => {+ const { isError, body } = await callRemote('remember', {});+ expect(isError).toBe(true);+ expect(body.error).toBe('invalid_params');+ expect(body.suggestion).toContain('output-token limit');+ expect(body.suggestion).toContain('items');+ });+it('rejects ISO-8601 duration ttl (P30D) with a self-correcting suggestion', async () => {const { isError, body } = await callRemote('remember', {fact: 'ttl trap', provenance: 'test', ttl: 'P30D',