{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "fitchmultz-pi-posthorse--long-coding-task-without-context-loss",
 "repo": "fitchmultz/pi-posthorse",
 "repo_url": "https://github.com/fitchmultz/pi-posthorse",
 "repo_slug": "fitchmultz-pi-posthorse",
 "title": "Keep a long Pi coding task going across fresh windows",
 "page_title": "How to keep a long Pi coding task going across fresh windows with Pi Posthorse",
 "summary": "Run a long Pi task that rolls into fresh context windows using saved notes instead of summaries.",
 "who": "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.",
 "problem": "Long sessions fill the context window, and a model-written summary can drop details the next steps depend on.",
 "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": [
  "Confirm your Node version with `node --version`; it must be 24.12.0 or later. (inferred, check the README)",
  "Update an older Pi installation before you install Posthorse.",
  "Run `pi install npm:pi-posthorse`.",
  "Run `pi`, then restart Pi after installation.",
  "Give Pi your task and ask it to save task state in a note before starting a fresh context window with the next steps."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "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"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "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."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/long-coding-task-without-context-loss/",
 "md": "https://dedupedai.com/use-cases/fitchmultz-pi-posthorse/long-coding-task-without-context-loss/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/fitchmultz-pi-posthorse--long-coding-task-without-context-loss.json",
 "api_version": "v1"
}
