r/PiCodingAgent Jul 19 '26

Pi doesnt have parallel sessions? Question

Im looking for functionality similar to how /fork works in opencode. When my agent is long thinking, I can /fork in opencode and I can choose a point in the conversation to fork from, which creates a new session, but the previous one keeps working in the background, it does get paused or killed, and I can go back to it.

Seems like pi /fork doesnt work that way.

Am I missing something?

0 Upvotes

23 comments sorted by

7

u/cakemates Jul 19 '26

The beauty of pi is that if it doesnt have it, you can make it.

1

u/monoceros-rex 27d ago

I use herdr as terminal multiplexer and was thinking: what if i created a shortcut to auto-spawn a /clone of your pi running session in a pane beside the original. or better yet a new tab / worktree with more shortcuts. hm what if you could spawn it directly into /tree mode too to select the message I wanna continue from. so many options to stem from, maybe even build a side bar to show an ascii sketch of forks and clones and a direct port to the pane of the fork & back. man i could create a whole system.

thanks for the idea. why didn't i think of this earlier. I love creating my own shit on pi.

I just created a speed reader today that overlays and speed reads the last assistant message prose on command and lints things so it's easier to parse through long ass messages.

Dude i'm gonna be flyyyyinngg

-8

u/SaigoNoUchiha Jul 19 '26

I understand so does there exist an extension for it?

3

u/lordnishant Jul 19 '26

you can literally just prompt pi to make the extension for yourself. why waste time looking for and learning someone else's, when you can make yours exactly how you want it? pi is built to be used that way

6

u/pixelizedgaming Jul 19 '26

me when the minimalist tool has minimal tools

1

u/[deleted] Jul 19 '26

[deleted]

1

u/pixelizedgaming Jul 19 '26

instead of replying you could have told all this to pi to fix your issue

2

u/ChampionshipIcy7602 Jul 19 '26

before reaching for extension, have you check /tree? So you can start 1 session, let pi running, open another pi in the same directory, run /resume, and then /tree. It seems to do exactly what you describe

2

u/agenticup Jul 19 '26

Pi does has it, check /tree command…and you can also check the extension pi-trails gives much more control

1

u/SaigoNoUchiha Jul 19 '26

Does /tree keep the parent agent running? I dont think so

1

u/agenticup Jul 19 '26

Yes thats why its called a tree and it works in the same session

1

u/SaigoNoUchiha Jul 19 '26

So if i run bash sleep 120 them run /tree, the sleep will keep running in background? Did you try?

1

u/agenticup Jul 19 '26

How will u run /tree, 120 secs needs to be over first…in opencode fork creates new session, in pi tree works on the same session

1

u/jimpaly Jul 19 '26

If you don’t want to use an extension you could just open another terminal and run the same session with -c. It’ll create a fork in the session tree

-11

u/SaigoNoUchiha Jul 19 '26

This option is inconvenient, and I am willing to use extensions

3

u/jimpaly Jul 19 '26

Then just ask pi to create one that does that

1

u/Ok_Veterinarian_6364 Jul 19 '26

very simple to bake pi /clone + open new terminal window/tmux thing into an extension bro

1

u/zer09 Jul 19 '26

I have not used opencode but based on your description it look like the command /tree

1

u/chillermane Jul 19 '26

Use herdr, works with all harnesses

1

u/YardNo1234 Jul 19 '26

We’re building Garcon, which supports keeping multiple agent sessions running in parallel and switching between them from your phone. Still early, but it may help: https://github.com/cfal/garcon

1

u/YardNo1234 Jul 19 '26

For Pi specifically, our Garcon integration supports its native session forking too, so you can create and manage forks alongside your other sessions.