the "agent finishes a task, then starts from zero" wall is real — i kept hitting it from a different angle than postgres-backed stash: file-system based.
my version: one tiny MEMORY.md (≤200 lines, loaded every turn) as index + .skills/<feature>.md per subsystem loaded conditionally + replay.md next to each skill containing the actual prompts that produced the rule (when behavior drifts, re-derive instead of patch).
honest trade-off vs postgres approach: file-system is grep-able + git-versioned (blame why a rule exists), but doesn't scale to 100k facts. does stash support expiry / decay? half my pain isn't "no memory" but "too much stale memory polluting context".
the part that resonated most: "starts from zero" is the easy failure. the silent worse one is when memory IS persisted but diverges from current code state → agent acts on yesterday's truth.
been collecting these patterns (skill files / AGENTS.md / MEMORY shards / MCP configs) on tokrepo.com/en — public registry, mostly file-system patterns; postgres/vector ones welcome to add.