Credentials. History can include user messages, assistant thinking, tool arguments, errors, and images, and retrieved content enters your selected model's context, so check for sensitive data before sharing it with a provider.
Who it is forA developer returning to a project after context was rolled over who needs the exact wording of an earlier decision, error, or tool result.
The problemAfter a rollover, the earlier conversation is out of the active window and the exact details are hard to find again.
The outcomeThe model retrieves the matching history entries, including images, and continues with the recovered details.
What you need first
- Node 24.12.0 or later
- Pi 1.0.0 or later (official Pi or the fitchmultz/pi fork)
- A terminal where you can run pi commands
- A decision on whether notes under .pi/notes/ should be added to .gitignore
Steps
- Install Posthorse with
pi install npm:pi-posthorseand restart Pi. - Ask Pi to search earlier conversation using the history tool, for example by a keyword from the decision.
- Ask for the
all: trueoption when the earlier work may be in another session of this project or in a nested subagent run. - Read the returned entries and ask Pi to confirm which one matches the decision you need.
- Keep the recovered details in a note if the next steps depend on them.
Prompt for your agent
Using the pi-posthorse repo (fitchmultz/pi-posthorse), use the history tool in the project at <project-path> to search earlier sessions for the decision about <topic>, including other sessions with all: true. Expected output: the matching history entries with their session context. Verify that each quoted detail appears in the returned history entries before you rely on it.
Caveat. Posthorse makes no network requests itself, but any history content you retrieve is sent to the model and provider you have selected.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for fitchmultz/pi-posthorse and "Find an earlier decision in past Pi sessions"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer