Skip to content

blog: How oh-my-pi Built Persistent Codebase Memory on Hindsight#2017

Merged
benfrank241 merged 7 commits into
mainfrom
blog/oh-my-pi-hindsight-memory
Jun 8, 2026
Merged

blog: How oh-my-pi Built Persistent Codebase Memory on Hindsight#2017
benfrank241 merged 7 commits into
mainfrom
blog/oh-my-pi-hindsight-memory

Conversation

@benfrank241

Copy link
Copy Markdown
Contributor

Summary

  • Adoption case study on oh-my-pi (`github.com/can1357/oh-my-pi`) — a 10,600+ star TypeScript/Rust terminal coding agent that uses Hindsight as its long-term memory backend.
  • README §11 is literally titled "Hindsight: memory the agent curates" — this post is a deep-dive on what they actually built on top of the API.
  • Every code snippet and config example is pulled verbatim from the public repo (`packages/coding-agent/src/hindsight/{bank,config,seeds,state,mental-models,client}.ts` and `docs/tools/{retain,recall,reflect}.md`).

What's covered

  • Bank scoping — three modes (`global` / `per-project` / `per-project-tagged`), with the actual `computeBankScope` function quoted; explanation of why their default (`per-project-tagged` with `tagsMatch: "any"`) is the right pick for a multi-repo coding agent
  • Mental-models layer — the full `seeds.json` verbatim (3 seeds: user-preferences, project-conventions, project-decisions, each with `trigger.mode = "delta"` + `refresh_after_consolidation: true`); the tag-discipline foot-gun documented in their source
  • Retain pipeline — the debounced queue (16-item batch / 5s interval), full-session auto-retain at session end, default config (`autoRetain: true`, `retainMode: "full-session"`, `retainContext: "omp"`)
  • Recall pipeline — auto-injection with the exact preamble they use, `recall` and `reflect` tool paths, endpoint paths
  • Why they replaced `@vectorize-io/hindsight-client` — minimal fetch client to control dependency surface, retries, timeouts; framed as a positive signal about API design
  • Pattern recognition — closes by tying the shape back to other Hindsight-backed coding agents (Hermes, Claude Code, OpenClaw)

Files

  • `hindsight-docs/blog/2026-06-05-oh-my-pi-hindsight-memory.md` — full post (~2,000 words)
  • `hindsight-docs/static/img/blog/oh-my-pi-hindsight-memory.png` — placeholder cover (reuses Hermes card; swap before merge)

Coordination note

This is a public-repo source-of-truth post, but it's still about another project's adoption of Hindsight. Worth coordinating with @can1357 before publishing — quick courtesy heads-up + offer to link to their work. The post is friendly toward the project throughout; happy to tweak phrasing if anything reads off-key after that review.

Test plan

  • Local Docusaurus build renders the post without broken links
  • Cross-link to Hermes post resolves (`/blog/2026/05/25/hermes-coding-assistant-codebase-memory`)
  • Cross-link to OpenClaw post resolves (`/blog/2026/05/27/openclaw-codebase-memory`)
  • Cross-link to MCP post resolves (`/blog/2026/03/04/mcp-agent-memory`)
  • All GitHub deep-links into `can1357/oh-my-pi` resolve
  • Cover image swapped from placeholder to final Hindsight x oh-my-pi art before merge
  • Quick courtesy ping to @can1357 before flipping to ready-for-review

@benfrank241 benfrank241 marked this pull request as ready for review June 5, 2026 15:22
Adoption case-study post on oh-my-pi (10k-star terminal coding agent
by @can1357) using Hindsight as its memory backend. All technical
details and code snippets pulled verbatim from the public repo at
github.com/can1357/oh-my-pi.

Covers: their three-mode bank-scoping policy (global / per-project /
per-project-tagged with the default being tag-based with `any` match);
the mental-model seed file (user-preferences, project-conventions,
project-decisions, each with delta-mode refresh_after_consolidation);
the debounced retain queue (16-item batch / 5s interval) and the
full-session auto-retain path; the auto-recall pipeline with the
exact preamble they use; and the reason they replaced
@vectorize-io/hindsight-client with a minimal fetch client.

Closes by tying the pattern back to other Hindsight-backed coding
agents (Hermes, Claude Code, OpenClaw) — same shape, different
implementations.

Cover image is a placeholder reusing the Hermes coding-assistant
card; final Hindsight x oh-my-pi art is a follow-up.
@benfrank241 benfrank241 force-pushed the blog/oh-my-pi-hindsight-memory branch from a2a7e30 to e6fba68 Compare June 8, 2026 19:01
benfrank241 and others added 2 commits June 8, 2026 15:12
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@benfrank241 benfrank241 merged commit e76021a into main Jun 8, 2026
70 checks passed
@benfrank241 benfrank241 deleted the blog/oh-my-pi-hindsight-memory branch June 8, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant