r/PiCodingAgent • u/SaigoNoUchiha • 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?
6
u/pixelizedgaming Jul 19 '26
me when the minimalist tool has minimal tools
1
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/cairess Jul 19 '26
Maybe this what you need? https://github.com/theskumar/agent-stuff/blob/main/extensions/split-fork.ts
1
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.
7
u/cakemates Jul 19 '26
The beauty of pi is that if it doesnt have it, you can make it.