Загрузка видео...
Не удалось загрузить видео
finally ported my fav Claude Code feature into Pi: `/subtask` a subtask is a fork of your current conversation, it inherits everything you've discussed, works in the background, and sends only its final answer back into the conversation that spawned it. Less context pollution/bloating and you can continue the... show more
18,595 просмотров • 2 месяцев назад •via X (Twitter)
Комментарии: 33

repo:

😍😍

Recently published similar plugin which relies on herdr or tmux: /fork-in-herdr or /fork-in-tmux to create a tab with a forked session

Is that each stack can have different model, or just inherited from its parent?

inherited from parent but easy to change if needed

Erm. How different is that from using /tree really?

/tree is navigation. this spawns another Pi with a copy of your conversation that runs in the background while you keep working then reports back its final output

Well, I use sub sessions in piclaw that do the same without a sub process, and that fold back into tree

i don’t know piclaw it’s probably prompted to know how to use Pi so that’s something else

I wrote it. The kind of session forking and folding you are describing does not need subprocesses, and can be built atop the session tree -

interesting I'll take a look if I can make this work inside the TUI and take a look at piclaw

how do you handle extensions in a single process?

There’s an entire extension and add-on subsystem - most of piclaw is a separate event loop and extensions, just point pi at the repo.

Let's gooo

Good stuff

sweet

Thank you 😊

Que la subtask solo devuelva la respuesta final mantiene limpio el hilo padre y evita arrastrar todo el ruido del trabajo intermedio.

Oooo really nice! Might submit a pr to detect if you are in herdr and have the sub task start in a pane

i don’t understand herdr but people seem to like it maybe i should try lol

Oh you’ll love it

does it break cache?

Very interesting. Been looking for something like that. pi-subagents lack a good UX, and are not native sessions.

Yeah was thining of this myself. i think /tree requires me to type first, then go back to achieve the same thing, unless im missing something

Do I need to instantiate the main agent first, and let it know that the subtasks are going to report back to it? Why not give the main agent the context to spin up subtasks?

you just start Pi and can start using subtasks. 2nd question: this works (check readme)

Sounds like /tree

Nice ! Proper orchestration is so important to go further and save tokens. Is it possible to choose the spawned model ?

great idea!! excellent use if cache!

Cool!

这个设计最像 fork-join。我唯一担心的是 re-inject 粒度:只回传最终答案的话,中间排查过程就丢了,父对话想追问一句“为什么”就得重跑整个 subtask。能按需调回中间 transcript 吗?

I am now telling claude code to find the pi session that works with other model, want it to talk each other. So they chat in the background. I think this is something like but you can't define a specific model to subtask right? Main and subtask should have different models...

Isn't this just tree with more steps?
