JuliusBrussee/caveman · error
cannot remember empty text
Error message
cannot remember empty text
What it means
Error "cannot remember empty text" thrown in JuliusBrussee/caveman.
Source
Thrown at mem/store.go:168
// Memory is one stored memory.
type Memory struct {
ID string `json:"id"`
Text string `json:"text"`
CreatedAt string `json:"created_at"`
ValidFrom string `json:"valid_from"`
ValidUntil *string `json:"valid_until,omitempty"`
Supersedes string `json:"supersedes,omitempty"`
SupersededBy string `json:"superseded_by,omitempty"`
}
// Remember stores text durably and returns it with a content-addressed id.
// Remembering identical current text twice is idempotent (same id, stored once).
// Text that exists only as an expired historical version is rejected: returning
// that row as success would claim it was remembered while Recall still hides it.
// The raw text is written before any other work, so a memory is never lost.
func (s *Store) Remember(text string) (Memory, error) {
if strings.TrimSpace(text) == "" {
return Memory{}, fmt.Errorf("cannot remember empty text")
}
if err := validateMemorySize(text); err != nil {
return Memory{}, err
}
id := memID(text)
created := time.Now().UTC().Format(time.RFC3339Nano)
// INSERT OR IGNORE keeps the original created_at on a repeat remember.
// RetryOnBusy: under a fan-out of cavemem processes, a queued writer can
// outlast a single busy_timeout (Windows file locking is the slowest case).
if err := ccr.RetryOnBusy(func() error {
_, e := s.db.Exec(
`INSERT OR IGNORE INTO memories (id, text, created_at, valid_from) VALUES (?, ?, ?, ?)`,
id, text, created, created,
)
return e
}); err != nil {
return Memory{}, fmt.Errorf("store memory: %w", err)
}View on GitHub (pinned to 27d5a3981a)
Solutions
- Provide non-empty text to remember.
When it happens
Trigger: Thrown at mem/store.go:168 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/74d3a882244eb342.
Report an issue: GitHub.