[Bug]: gt remember is broken — hardcodes the "memory." bd-kv prefix that bd kv set now reserves
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
gt remember fails on every invocation, unconditionally:
$ gt remember --type user --key some-key "some content"
Error: invalid key: key cannot start with "memory." (reserved for persistent memories; use 'bd remember' / 'bd forget')
Error: storing memory: exit status 1Root cause — internal/cmd/remember.go:
const memoryKeyPrefix = "memory."
...
fullKey := memoryKeyPrefix + memType + "." + key
...
bdKvSet(fullKey, content) // shells out to `bd kv set <key> <value>`Every key is unconditionally prefixed memory. (not avoidable via --key, since the prefix is prepended after the user's key). bd kv set now refuses any key with that prefix — confirmed independent of gt remember:
$ bd kv set "memory.test.whatever" "x"
Error: invalid key: key cannot start with "memory." (reserved for persistent memories; use 'bd remember' / 'bd forget')bd has grown its own native bd remember/bd forget memory subsystem that reserves memory. in the shared bd kv keyspace, and gt remember's hand-rolled system (built on generic bd kv calls) now collides with its own reserved prefix on every call.
Expected Behavior
gt remember should succeed, storing the memory for later injection via gt prime.
SDK Version I encountered this issue in
gt version: dev (built from current main at time of report)
Steps To Reproduce
gt remember --type user "any content"— fails with the error above, every time, regardless of--type/--key.bd kv set "memory.x.y" "z"— fails identically, confirming the prefix itself is whatbdrejects, not anythinggtdoes wrong with formatting.
Filled out the Steps to Reproduce section?
- I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.
Anything else?
Workaround: bd remember "<content>" --key <key> (bd's own native command) works fine.
Given bd remember/bd forget now exist natively with their own bd prime injection, gt remember may be fully redundant — worth considering delegating to them directly rather than patching around the prefix collision.
Tracked internally as gt-5e5.
Source: gastownhall/gastown