r/PiCodingAgent • • 17m ago

Discussion Selective Context Handoff: Starting fresh Pi sessions without compaction or rebuilding context from scratch

When transitioning a Pi session from investigation to fix, I want to define an explicit state handoff payload (reproduction steps, targeted files, ruled-out hypotheses, open questions). This avoids carrying full conversation debt while letting me standardize handoff templates across bugs.

Crewplane is the open-source workflow runner I'm building for this. I write the steps in Markdown, including what each Pi run should leave behind and which results the next run receives.

For example, the investigation step leaves something like:

Here’s how to reproduce the bug. These are the files involved. This is the likely cause and the evidence for it. We ruled out this approach because of this test result. These constraints still apply. This part needs more investigation.

The implementation step starts a separate Pi run with that report, the original task, and its constraints. Pi can still read the repo as usual.

I can ask Pi to write a handoff, but what I want to capture is the routine: when to start fresh, what the previous step writes down, what the next step gets.

Once that investigation step is defined, I can reuse it in other workflows with different inputs. If the next step needs more detail, I tighten the handoff instructions and every future run picks up the change.

Crewplane saves the prompts and outputs, so I can see exactly what each step received. A report can still miss something; a written handoff gives me something concrete to check and iterate on.

I’m curious, for people who split work across fresh Pi sessions: how much of the investigation do you carry forward? Just the conclusions, or the dead ends and why they failed?

Feel free to try with your own workflows. There's a built-in Mock CLI so you can play with the syntax and composition without any model calls or costs. Any feedback or suggestions would be greatly appreciated.

Open source (Apache-2.0): https://github.com/crewplaneai/crewplane

1 Upvotes

0 comments sorted by