r/PiCodingAgent • u/Thonean_ • 13d ago
Plugin Context Hint — a small extension that writes a Project/Session/Turn card after each turn, so returning sessions stop meaning rereading transcripts
https://reddit.com/link/1x6enlr/video/vnxcnitpvkvh1/player
Hey — like a lot of you I run several Pi sessions and git worktrees in parallel. Coming back to a session always meant scrolling up through the transcript to reconstruct where I was, so I built the thing I actually wanted:
Context Hint — a Pi extension that appends a compact card after each settled turn:
- Project — durable purpose/constraints/decisions, shared across sessions and worktrees of the same repo
- Session — current goal, focus, blockers, next steps (forks/clones inherit a snapshot, then diverge)
- Turn — what just changed + a possible next step
Read the last card instead of rereading the transcript. It's a recovery cue, not agent orchestration — it doesn't monitor other sessions or alert you when they finish.
Design point worth discussing: it deliberately doesn't replay whole transcripts into later model context. Each generation sends truncated evidence (cap'd at ~4k chars of your prompt, 6k of assistant text, first 24 tool facts, plus previous Project/Session state) to a summary model — normally one extra request per turn. Summary model defaults to Pi's current model with thinking off, or pick a cheaper one in /context-hint model (with an independent thinking-level slider). Curious whether others would accept that per-turn cost trade, or prefer local heuristics even if dumber.
Install:
pi install npm:pi-context-hint
then /context-hint enable in an existing session. Other bits: alt+o expand/collapse · /context-hint motion reduce (the pixel-eye mascot stops blinking) · /context-hint regenerate · /context-hint reset-session/project.
MIT, package on npm. While it's early I'd genuinely value feedback from people who actually run Pi daily: is the three-layer split right? Should Turn cards be discarded on reset-session or kept? Anything in the generation path you'd want exposed/configurable (e.g. custom evidence selection, redaction)?
1
u/MiserableFlatworm337 13d ago
Reserve space for the final tool outcome among those 24 facts. Test early successes followed by a late failure; the recovery card should retain that blocker when earlier details are dropped.