Pi /tree: inside one saved session
wait-list example 6 written messages
Pi can keep several conversation paths in one session. Follow this small example, then revise an earlier prompt yourself. Nothing here runs a model or changes project files.
- You
Make a wait-list form. Keep confirmation on the page.
- Pi
I will place the confirmation beside the submit button.
Which alternative follows that reply?
Both alternatives are saved. The active conversation follows one parent chain through the two shared messages above.
- You
Try a modal confirmation instead.
- Pi
Show “Request received” in a dialog. Focus its Close button, then return focus to Submit when it closes.
Also saved: 2 messages outside this active path
- You: Keep it inline and make the confirmation readable without colour.
- Pi: Announce “Request received” in a polite status region. Keep keyboard focus on Submit.
The inline alternative is not on this active path. Expanding its saved messages does not add them to the conversation.
Choose the message before you change the wording
In Pi's /tree, choosing a user message returns that prompt to the editor and places the active point at its parent. Choosing an assistant reply keeps that reply in the history and opens an empty editor. Those are different starting points.
Try the inline alternative and edit its earlier prompt. The count falls from four messages to two while you compose. Add “Keep it inline, and include the request number.” The new message becomes another child of the shared reply; the old inline answer is still saved, but is not an answer to your revised prompt.
Only the conversation portion is shown here. A real request also includes system instructions, project context, tools and other inputs. Four messages does not mean four complete inputs to the model, or a particular token cost.
Sources and a reproducible version of this example
Based on the Pi 1.3.0 session documentation and pinned context projection functions. Session branching predates this release.
Download the source example and offline checks (ZIP). Unzip, then run node verify.mjs with Node 20 or later. No package install, account or network request is required. The packet includes the original fixture, extracted MIT-licensed functions and source hashes.
The browser's editable practice is deliberately limited to this example. It does not implement the complete Pi CLI, session persistence, extensions, tool execution or provider formatting. Its JSON download is a teaching record, not a file to import into Pi. The written assistant replies are not generated or verified code.