# AI use cases for Pi Posthorse (fitchmultz/pi-posthorse)

Repo: [fitchmultz/pi-posthorse](https://github.com/fitchmultz/pi-posthorse) | Use cases: 3 | Page: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/

Posthorse is a TypeScript extension for the Pi coding agent that starts fresh context windows for long tasks and keeps earlier conversation recoverable, without a model-written summary.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Keep a long Pi coding task going across fresh windows: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/long-coding-task-without-context-loss/
- Find an earlier decision in past Pi sessions: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/recover-earlier-conversation-from-history/
- Test Posthorse in one Pi session before installing: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/try-posthorse-for-one-pi-session/

## How to keep a long Pi coding task going across fresh windows with Pi Posthorse

Repo: [fitchmultz/pi-posthorse](https://github.com/fitchmultz/pi-posthorse) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Run a long Pi task that rolls into fresh context windows using saved notes instead of summaries.

**Who it is for:** A developer using the Pi coding agent on a multi-step task that runs past one context window and needs to keep going without re-explaining the work.

**The problem:** Long sessions fill the context window, and a model-written summary can drop details the next steps depend on.

**The outcome:** The task continues in a fresh context window with its state restored from notes and live checks, and the session history stays recoverable.

### Steps

1. Confirm your Node version with `node --version`; it must be 24.12.0 or later. (inferred, check the README)
2. Update an older Pi installation before you install Posthorse.
3. Run `pi install npm:pi-posthorse`.
4. Run `pi`, then restart Pi after installation.
5. Give Pi your task and ask it to save task state in a note before starting a fresh context window with the next steps.

### Prompt to paste into your agent

```text
Using the pi-posthorse repo (fitchmultz/pi-posthorse), set up Posthorse for the project at <project-path>, then give Pi a multi-step coding task and ask it to save task state in notes before rolling over. Expected output: a task note saved under .pi/notes/ in the project and a fresh context window started. Verify by running `pi list` and confirming pi-posthorse appears as an installed source.
```

### Caveat

Only one Posthorse copy should be loaded, and automatic rollover needs at least 10,000 tokens after compaction.reserveTokens, so smaller models may fall back to Pi's own compaction.

Risk, credentials: Notes are plaintext files under .pi/notes/, so keep secrets out of them and add that folder to .gitignore if the notes must stay private.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/long-coding-task-without-context-loss/

## How to find an earlier decision in past Pi sessions with Pi Posthorse

Repo: [fitchmultz/pi-posthorse](https://github.com/fitchmultz/pi-posthorse) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Search prior conversation and sub-agent runs in the project to recover a decision or error detail.

**Who it is for:** A developer returning to a project after context was rolled over who needs the exact wording of an earlier decision, error, or tool result.

**The problem:** After a rollover, the earlier conversation is out of the active window and the exact details are hard to find again.

**The outcome:** The model retrieves the matching history entries, including images, and continues with the recovered details.

### Steps

1. Install Posthorse with `pi install npm:pi-posthorse` and restart Pi.
2. Ask Pi to search earlier conversation using the history tool, for example by a keyword from the decision.
3. Ask for the `all: true` option when the earlier work may be in another session of this project or in a nested subagent run.
4. Read the returned entries and ask Pi to confirm which one matches the decision you need.
5. Keep the recovered details in a note if the next steps depend on them.

### Prompt to paste into your agent

```text
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.

Risk, 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.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/recover-earlier-conversation-from-history/

## How to test Posthorse in one Pi session before installing with Pi Posthorse

Repo: [fitchmultz/pi-posthorse](https://github.com/fitchmultz/pi-posthorse) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Load Posthorse for a single session to check rollover behavior without a permanent install.

**Who it is for:** A developer who wants to evaluate fresh-window rollover on a real task before committing to an install in their Pi setup.

**The problem:** Installing a context extension permanently is a bigger change than a developer may want to make before seeing how it behaves.

**The outcome:** The developer runs one Pi session with Posthorse loaded, watches rollover happen, and decides whether to keep it.

### Steps

1. Confirm Node 24.12.0 or later and Pi 1.0.0 or later are available.
2. Run `pi -e npm:pi-posthorse` to start Pi with Posthorse for one session.
3. Give Pi a long task and watch for the Compacted from card and any new_context request.
4. Run `pi remove npm:pi-posthorse` later if you decide not to keep it, since removal leaves notes and history in place.

### Prompt to paste into your agent

```text
Using the pi-posthorse repo (fitchmultz/pi-posthorse), start a single Pi session for the project at <project-path> with `pi -e npm:pi-posthorse`, run a long task, and report whether a new_context request or a Compacted card appears. Verify that pi list does not show a permanent install if the developer asked for a one-session test.
```

### Caveat

Two Posthorse copies can compete for rollover, so keep only one copy loaded, and check installed sources with pi list.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/try-posthorse-for-one-pi-session/
